login_hint as optional claim

testuser7 271 Reputation points


I have simple but annoying question.

I want couple of extra claims in the JWT token that is created by AAD for the app.
I have added two "optional claims" in the registered app in my tenant through portal.
Those are ctry and login_hint

ctry is properly coming in the id-token but login_hint is not at all part of the token.
As per doc, both claims are allowed for both versions of id-token. So no confusion about it.
I see both claims properly added in the manifest of the app.
Any idea why login_hint is not added in the token when I hit following


Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,392 questions
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. testuser7 271 Reputation points


    Any update from MSFT around above query is appreciated.


    0 comments No comments

  2. James Hamil 21,546 Reputation points Microsoft Employee

    Hi @testuser7 , sorry for the delay in response. Have you had the chance to review this thread?

    "You need to configure the optional claims on the access token for the API, not the ID token."

    Please let me know if this works for you. If not I can help you further!

    If this answer helped you please mark it as "Verified" so other users can reference it.

    Thank you,

  3. testuser7 271 Reputation points

    Agree with @Mark Kaplan

    Besides, @James Hamil if you check my request URL, you will notice that I am not asking any scope that leads to access-token. It is just simple ID-TOKEN


    Really unusual and interesting use-case.


    0 comments No comments

  4. testuser7 271 Reputation points

    Hi @James Hamil How is it looking ? Interesting. Isn't it ??
    I am wondering how did I miss this last so many years working on AAD

    Logically login-hint was always something that should come from the app.
    The only usecase where AAD packs it in token is when 2 apps wants to do SSO seamlessly.
    It can be passed between applications to help them silently SSO as well

    0 comments No comments

  5. Scott, Steven 0 Reputation points

    I am trying to use login_hint for promptless logout described here But the dev team says the optional claim is coming across as undefined.

    Using Terraform provider below against the azure ad application defined in the module here is how I am configuring the login_hint. Should it be assigned to the access token?

    id_token {
        name      = "login_hint"
        source    = "user"
        essential = false
    0 comments No comments