login_hint as optional claim

testuser7 206 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


Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
13,466 questions
No comments
{count} votes

4 answers

Sort by: Oldest
  1. testuser7 206 Reputation points


    Any update from MSFT around above query is appreciated.


  2. James Hamil 12,901 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 206 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.


  4. testuser7 206 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