Include OID claim in ID token

Roberto Lambertini 41 Reputation points
2024-12-19T18:24:15.76+00:00

Hello,

I'm testing the new Entra ID External tenants, but I can't find a way to get an ID token including the OID claim.

In AAD B2C tenants the OID claim is always included in ID token and it identifies the user inside the directory (i.e. doesn't depend on the app the user is logging in).
I can see only the SUB claim, but it doesn't fit my requirements.

Any hints?

Thanks in advance
Roberto

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,968 questions
0 comments No comments
{count} votes

Accepted answer
  1. Roberto Lambertini 80 Reputation points
    2024-12-20T15:52:36.61+00:00

    Hi Navya,
    thanks for your reply. I found a way to get this claim.

    As stated in the reference
    https://zcusa.951200.xyz/en-us/entra/identity-platform/id-token-claims-reference
    to retrieve this claim, the app must be granted "profile" scope access.

    In the Entra portal, the UI for the "run user flow" feature does not allow selecting which scopes to request, and the scope dropdown is locked to "openid".
    To obtain the claim, you need to manually add the "profile" scope to the test URL.

    Roberto

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Navya 14,040 Reputation points Microsoft Vendor
    2024-12-19T21:53:56.3733333+00:00

    Hi @Roberto Lambertini

    I understand that the oid claim is not included in the ID token in Microsoft Entra ID External tenants.

    According to this document https://zcusa.951200.xyz/en-us/entra/external-id/customers/reference-oidc-claims-mapping-customers The ID token does not include the oid claim, which is why you are not getting it in the ID token. Unfortunately, there is no way to customize these claims.

    I would like to request that you share your feedback on our feedback channel https://feedback.azure.com/d365community/forum/22920db1-ad25-ec11-b6e6-000d3a4f0789 Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.

    Hope this helps. Do let us know if you any further queries.

    Thanks,

    Navya.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

Your answer

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