When using Custom Domain , is there a claim that will reflect the custom domain the identity is assigned?

Martin Kallukalam 365 Reputation points
2025-04-17T19:36:01.95+00:00

Scenario:
I have 3 custom domains

domain1

domain2

domain3

Is there a way to get the domainname as a claim in id token and access token when a user gets a token using interactive login (auth code grant flow)

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
24,479 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sanoop M 2,835 Reputation points Microsoft External Staff Moderator
    2025-04-21T08:13:18.5333333+00:00

    Hello @Martin Kallukalam,

    Please note that we can pass email id, UPN, family_name, Onprem_sid, etc as a claim in ID token as well as Access token, but specifically we cannot pass the domain name as a claim in ID token and Access token.

    Please note that the only way to get the domain names is to pass UPN/Email ID as Claims and get the domain name from that passed claims.

    Please refer to the below documents to know in detail about Access tokens and ID tokens.

    Access tokens in the Microsoft identity platform - Microsoft identity platform | Microsoft Learn

    ID tokens in the Microsoft identity platform - Microsoft identity platform | Microsoft Learn

    Tokens and claims overview - Microsoft identity platform | Microsoft Learn

    I hope the above provided information is helpful. Please let me know if you have any additional queries.


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.