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

Ganesh Jagdale 61 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,

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,895 questions
Microsoft Graph Users API
Microsoft Graph Users API
A Microsoft API that allows you to build compelling app experiences based on users, their relationships with other users and groups, and the resources they access for example their mails, calendars, files, administrative roles, group memberships.
734 questions
Microsoft Graph Profile API
Microsoft Graph Profile API
A Microsoft API that retrieves the profile of the signed-in user or another user with a valid Azure AD or Microsoft account.
106 questions
0 comments No comments
{count} votes

Accepted answer
  1. Shweta Mathur 15,071 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 23,686 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.