Oid and sub claim are missing from AAD V2 access token

Geethanjali 41 Reputation points Microsoft Vendor
2022-04-22T21:55:23.517+00:00

195648-image.png

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,100 questions
0 comments No comments
{count} votes

Accepted answer
  1. Shweta Mathur 26,721 Reputation points Microsoft Employee
    2022-04-25T08:38:11.453+00:00

    Hi @Geethanjali ,

    Thanks for reaching out.

    I understand that for first party application, you are not able to get oid and sub claim in access token.

    As this is first party application and when you are signing in with MSA account, MSA pass through the user and does not add as guest user object in the tenant.
    Since there is no object ID of User, so no OID claim returning in the token.

    Alternatively, OID and sub claims will be null and not returned in the token, if the user logs in into a tenant where the apps are not provisioned, and its service principal is missing in that tenant.

    Hope this will help.

    Please remember to "Accept Answer" if answer helped you.
    Thanks,
    Shweta


1 additional answer

Sort by: Most helpful
  1. Geethanjali 41 Reputation points Microsoft Vendor
    2022-04-26T03:07:24.17+00:00

    Hi @Shweta Mathur
    Thank you for the help. As per the link, I have provisioned the Service Principal for my test application and was able to get the Oid and sub claim in the access token.
    Appreciate the help.!!