Azure Ad JWT Token set custom claims name

bruce 41 Reputation points
2021-05-31T11:07:18.02+00:00

I want to add more claims into access Token.
But I cannot set the name to "role", "clientId", "tenant" etc.

Can I do that or do we have some restrict words for claims

Microsoft Security Microsoft Entra Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 56,866 Reputation points Moderator
    2021-06-01T05:58:51.617+00:00

    Hi @bruce · Thank you for reaching out.

    There are a number of restricted claims like role, roles, client_id and so on, which are restricted and reserved for specific purposes. You can not set these claims.

    You can find entire list of JWT restricted claims here: JSON Web Token (JWT) restricted claim set

    -----------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. bruce 41 Reputation points
    2021-06-02T10:10:14.223+00:00

    Got it, Many thanks.

    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.