I am able to use claims mapping to add extenstion properties into an id_token. Is there a way to do that in an access token ? (Or is my only option to call Graph for that) ?
Asked
Active
Viewed 306 times
1 Answers
0
Assigning the claimsMappingPolicy to the servicePrincipal which represents the client app will add custom claim into id token. In order to add the custom claim into access token, you need to assign the claimsMappingPolicy to the servicePrincipal which represents the backend API, just like what you have done in the client app.
See detailed steps from this answer.
Please note that it only applies to the scene that you are trying to call your own API which is protected by AAD. If you are calling Microsoft Graph, you cannot make it work because it's impossible to configure claimsMappingPolicy from Microsoft Graph side.

Allen Wu
- 15,529
- 1
- 9
- 20
Get-AzureADUser -ObjectId
My client applicatation id is different from the extenstion_id1 but when I do a claims mapping on my client application service principal I do see claims mapping show up on the id token. I have my own API which has its own appid (lets say id3).