Graph - How to add properties on profile card?

KM KTNN 1 Reputation point
2022-04-06T19:28:45.79+00:00

We tried to add the 'PostalCode' property in the profile card in our tenant using the profile card API in MS Graph. It seems to work properly in the Graph Explorer but 24 hours later we don't see the 'PostalCode' on the profile card. https://learn.microsoft.com/en-us/graph/add-properties-profilecard

190886-graph-profilecard.png

This person had the same problem:
https://learn.microsoft.com/en-us/answers/questions/364670/graph-api-create-profilecardproperty-not-showing-o.html

Would you be able to help us?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,506 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Sheena-MSFT 1,721 Reputation points
    2022-04-07T17:13:42.31+00:00

    Hi @KM KTNN ,

    I would like to share possible scenario to check why attributes that are added via Graph are not displaying in the profile card.

    • If you are trying to make additional attributes to add in profile card, please check whether anyone of the user in your tenant have value in there user profile through Azure AD. Please find the below screen shot.

    190950-profile-2.png

    • Could you please try this endpoint https://graph.microsoft.com/beta/users/{UPN/user id} in Graph Explorer and search for the
      onPremisesExtensionAttributes attribute in the response for anyone of your user to check whether you have value for your customAttribute2. Please find the screenshot below
      190989-profile1.png
    • If values are there in the back end user profile then we want to check from which o365 app your are trying check the updated profile card. Note: Profile card on which customization is allowed is currently only available for web apps such as Outlook Web App, OneDrive SharePoint, Office.com. Added Custom attributes wont be visible in Outlook Clients as this change is limited to only web client experiences for now.
    • According to this documentation for cloud only user we have to set these attributes on the creation and update operation of users entity. If a cloud-only user was previously synced from on-premises Active Directory, these properties cannot be managed via the Microsoft Graph API. Instead, they can be managed through the Exchange Admin Center or the Exchange Online V2 module in PowerShell ----custom attributes

    Note: APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported

    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.

    0 comments No comments

  2. KM KTNN 1 Reputation point
    2022-04-08T13:12:06.667+00:00

    Thank you for your reply.

    I can see the PostalCode in Graph:

    191317-image.png

    But I don't see it the Profile Card of People Search in M365.