Add custom attribute with Graph Explorer on a profile card does not work

Birgit W 0 Reputation points
2024-03-08T07:55:40.0466667+00:00

Hi all,

for quite a time I've been struggling with adding custom attributes on profile cards using Microsoft Graph.

I am testing in a tenant offered by the Developer Program and followed the instructions here: Add or remove custom attributes on a profile card using the profile card API - Microsoft Graph | Microsoft Learn

Adding UserPrincipalName, Fax, StreetAddress, PostalCode, StateOrProvince or Alias is working.

I made sure that the extensionAttribute1 of every user in this test tenant has a value:

Image

However, adding customAttribute1 (as the employee ID) to profile cards is not working. I get this error:

Image

Does anyone have an idea why it is not working?

Kind regards

Birgit

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Carolyne-3676 876 Reputation points
    2024-04-08T16:57:37.5366667+00:00

    These custom attributes are currently not directly accessible by the profile card in Microsoft Graph hence why you run into this issue. You will likely need to lodge a feature request for this. Here is the link - https://developer.microsoft.com/en-us/graph/support

    As a work around, can you try and access the attributes using this below since I see it is available as part of the OnPremiseExtensionAttribute but this depends on whether there was an on prem entity

    GET https://graph.microsoft.com/v1.0/users/{id}?$select=onPremisesExtensionAttributes
    
    

Your answer

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