Share via

Access token without sensitive claims

David H 1 Reputation point
2022-05-13T14:28:50.367+00:00

Does anybody know if is possible to remove the preferred_username claim from v2 access token for an app (resource server) with a ClaimsMappingPolicy applied without basic claim set? (no api access granted for the app on Azure AD)

Thank you in advance.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments

1 answer

Sort by: Most helpful
  1. Alfredo Revilla - Upwork Top Talent | IAM SWE SWA 27,551 Reputation points Moderator
    2022-05-14T05:04:17.343+00:00

    Hello @David H , preferred_username is member of the Restricted claim set and thus cannot be modified using a policy, the data source cannot be changed and no transformation is applied when generating it.

    You can avoid getting it if the profile scope is omitted.

    Let us know if this answer was helpful to you. If so, please remember to accept it so that others in the community with similar questions can more easily find a solution.

    Was this answer helpful?


Your answer

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