Issues adding Profile Card Properties, No errors?

Aleks R 0 Reputation points
2024-09-03T18:28:28.3433333+00:00

Hello, I'm trying to add a "Team" attribute to users Profile Card Properties in Office 365 & SharePoint.

I have followed this article and no errors have shown. But neither have the results i wanted. I am simply trying to add a "Team" attribute so we can mark staff teams they are apart of.

In this case we can't use the attributes like 'department' or 'employee type'. I am trying to utilize "CustomAttribute1" which hasn't previously been used in the tenant.

Article: https://video2.skills-academy.com/en-us/graph/api/peopleadminsettings-list-profilecardproperties?view=graph-rest-1.0&tabs=http

Last time i did this 5 or so years ago, i ran the POST the command with formatted post body, and ran GET a day later and it showed up inside the 365 admin center exchange as apart of every users profile card. Is it possible this applied and I'm just literally looking in the wrong spot for "CustomAttribute1" to show up or populate? this environment wouldn't be considered a hybrid and I'm wondering if this is what's messing me up. I haven't been able to dig up enough information on hybrid environments & Graph Explorer.

Commands Ran:

POST: https://graph.microsoft.com/v1.0/admin/people/profileCardProperties
using https://developer.microsoft.com/en-us/graph/graph-explorer
Permissions: PeopleSettings.Read.All & PeopleSettings.ReadWrite.All

Post Body:

{ "directoryPropertyName": "Alias", "annotations": [] }

Response Body:

directoryPropertyName",
    "value": [
        {
            "directoryPropertyName": "Team",
            "annotations": []
        }
    ]
}

Any tips or ideas would be very well appreciated
~ Thank you

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,830 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,567 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,372 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Hitesh Pachipulusu - MSFT 1,180 Reputation points Microsoft Vendor
    2024-09-05T07:14:17.7133333+00:00

    Hello Aleks R,

    Thank you for contacting Microsoft Support!

    For the resolution, you can use MS Graph Explorer https://developer.microsoft.com/en-us/graph/graph-explorer. Ensure that you are login with your global admin account.    

    1. Map the custom attributes with display name. Required Scopes - PeopleSettings.Read.All (Delegated)
         POST https://graph.microsoft.com/v1.0/admin/people/profileCardProperties
         Content-type: application/json; charset=utf-8
         {
           "directoryPropertyName": "CustomAttribute1",
           "annotations": [
             {
               "displayName": "Team"
               
             }
           ]
         }
         
      
    2. Once the above executed, you can verify it by calling below endpoint.
         GET https://graph.microsoft.com/v1.0/admin/people/profileCardProperties?$select=annotations,directoryPropertyName 
         
      
    3. Assigning the user information to the newly created custom attributes. Call below endpoint. *** For assigning/updating a batch users record with these custom attributes, you will need to create a custom code calling the endpoints. Required Scopes - User.ReadWrite (Delegated)
         PATCH https://graph.microsoft.com/v1.0/users/{user-id}
         {     
           "onPremisesExtensionAttributes": {
                  "extensionAttribute1": "team_name"
              }
         } 
         
      
    4. Verify the assignment value by calling this endpoint.
         GET - https://graph.microsoft.com/v1.0/users/{user-id}?$select=onPremisesExtensionAttributes 
         
      
    5. You will need to wait at least after 24hours to see the Profile Card with new custom attributes.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    1 person found this answer helpful.
    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.