Azure-docs: Where is the mapping between the claim type URI and the JWT identifier?

Created on 23 Jun 2019  Â·  8Comments  Â·  Source: MicrosoftDocs/azure-docs

I need to diagnose an issue where the code is reading claims by URI (i.e. http://schemas.microsoft.com/identity/claims/objectidentifier), but the parsed JWT token shows only the short identifier (oid).

For instance, what is the short name for claim http://schemas.microsoft.com/ws/2008/06/identity/claims/confirmationkey ?

Ideally, the list here should provide the mapping. But if there is query I can do on my tenant to find this, please specify.

Thanks


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 active-directorsvc cxp in-progress product-question triaged

All 8 comments

@msfcolombo Thanks for the question! We are investigating and will update you shortly.

@msfcolombo The following doc has a list of the all the JWT identifiers sent in the payload of Azure AD token.

Let me know if this is the list you are looking for?

That one shows only short names. I need the mapping between the claim spec URI (http://schemas/etc) and the short name.

@msfcolombo The claim spec URI format is not used in JWT. It is used only in SAML and can be customized for any custom claims you need.

There is no actual list which has this information.

@msfcolombo We have not heard from you in a while. We will now proceed to close this thread. If you have further questions, please tag me in the comments and I will gladly continue the conversation.

@ManojReddy-MSFT Some mappings are displayed in this document:

This table lists the claim types as they appear in the ID token. In ASP.NET Core, the OpenID Connect middleware converts some of the claim types when it populates the Claims collection for the user principal:

oid > http://schemas.microsoft.com/identity/claims/objectidentifier
tid > http://schemas.microsoft.com/identity/claims/tenantid
unique_name > http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name
upn > http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn

Yet is not clear if that is a complete or partial list. Also, the mentioned "OpenID Connect middleware" is a lousy definition for software component. I think if we can find that software component, we can get the full mapping.

For the record, the full list of mappings are defined in ClaimTypeMapping.cs in the System.IdentityModel.Tokens.Jwt assembly/package:

https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/dev/src/System.IdentityModel.Tokens.Jwt/ClaimTypeMapping.cs

Thanks @colgreen! That's exactly what I was looking for!

Was this page helpful?
0 / 5 - 0 ratings