Is it possible to fetch issuerAssignedId along with other user properties?

Ganesh Jagdale 66 Reputation points
2022-04-25T22:01:03.003+00:00

Hi MS team,
I am using MS Graph API to manage users. I am using user email id as issuerAssignedId. I want to the same return in /Users/Id api.
Please suggest how I can get thta issuerAssignedId in Get user api call?
There is also mail property that I can re-used here but I have many exisitng users whoes email property is not set so I can not use that. Please help me here.
Thanks in advance!

Thanks,

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,544 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,425 questions
0 comments No comments
{count} votes

Accepted answer
  1. Shweta Mathur 27,216 Reputation points Microsoft Employee
    2022-04-26T06:29:57.333+00:00

    Hi @Ganesh Jagdale ,

    Thanks for reaching out.

    I understand you are looking to get a user detail along with issuerAssignedId in response using Graph API.

    As you are filtering based on identities, you must supply both issuer and issuerAssignedId in Graph API V1 endpoint as:

    https://graph.microsoft.com/v1.0/users?$select=displayName,Identities&$filter=identities/any(c:c/issuerAssignedId eq 'xxx@Stuff .com' and c/issuer eq 'xxx.onmicrosoft.com')

    In the response, you will get issueAssignedId along with other user details which are mentioned in the query.

    196463-image.png

    Hope this will help.

    Thanks,
    Shweta

    ----------------------------------------------------------

    Please remember to "Accept Answer" if answer helped you.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. CarlZhao-MSFT 36,891 Reputation points
    2022-04-26T03:11:34.58+00:00

    Hi @Ganesh Jagdale

    You can use the beta endpoint to get all attributes of the user, including the issuerAssignedId attribute.

    196389-image.png

    However, the beta endpoint can only be used in a test environment. If you want to use it in a production environment, then you need to switch to the V1.0 endpoint.

    https://graph.microsoft.com/v1.0/users/{id}?$select=identities,userPrincipalName,mail,displayName,id  
    

    Note: The value of issuerAssignedId must be the email address of the user account, not the user principal name (UPN).


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.