Share via

How to add Custom User Attributes to Access Token

Manuel Tospann 316 Reputation points
2026-02-23T15:38:24.5466667+00:00

In our external tenant, we added a couple of custom user attributes under Entra > External Identities > Custom user attributes.

We don't want to see those attributes during sign up. We set the values via Graph API.

We want the attributes to appear in the access token. How can we achieve this?

When I go to the app registration that's behind the user flow, I cannot select the attributes under Manage > Token configuration > Add optional claim.

I tried to manually add them to the Manifest:

	"optionalClaims": {
		"accessToken": [
			{
				"additionalProperties": [],
				"essential": false,
				"name": "extension_b2c-extensions-app-id_store",
 				"source": "user"
			}
[...]

When I add the attributes to the Enterprise Application under Manage > Single sign-on > Attributes & Claims, they appear in the ID Token. But that's not where I need them.

How can I add them to the Access Token?

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

Answer accepted by question author
  1. Rukmini 29,300 Reputation points Microsoft External Staff Moderator
    2026-02-23T15:41:07.7733333+00:00

    Hello @Manuel Tospann

    To get optional claims in access token, you need to generate scope for your API that is expose and API, Add scope.

    • Add the scope as API permission, grant admin consent.

    Once done pass the scope api://ClientID/ScopeName and generate the access token.

    User's image

    Reference: https://learn.microsoft.com/en-us/entra/identity-platform/optional-claims?tabs=appui#configure-directory-extension-optional-claims

    Let me know if any further queries - feel free to reach out!

    Hello @Manuel Tospann If the resolution was helpful, kindly take a moment to click on 210246-screenshot-2021-12-10-121802.png for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.

0 additional answers

Sort by: Most 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.