Issue with logout_hint not suppressing account selection prompt

Krishna Amal 20 Reputation points
2025-04-02T05:19:54.7433333+00:00

A request is made to log out from the application using the logout_hint parameter, but an account selection prompt still appears. The logout request format used is as follows:

https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/logout?id_token_hint={id_token}&post_logout_redirect_uri={redirect_uri}&logout_hint=user@example.com

Despite including logout_hint, the account selection prompt is still displayed. What could be the reason for this behavior?

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

Accepted answer
  1. Rukmini 1,421 Reputation points Microsoft External Staff
    2025-04-04T06:23:38.5533333+00:00

    Hello @Krishna Amal,

    I understand that you are trying to log out from the application using the logout_hint parameter without any prompt that is Prompt less logout.

    The issue you are facing is because, you are passing logout_hint as UPN.

    Note: You need to pass login_hint value in logout_hint. Don't use UPNs or phone numbers as the value of the logout_hint parameter. Refer this Microsoft Document: OpenID Connect (OIDC) on the Microsoft identity platform | Azure Docs

    enter image description here

    When I passed UPN as the logout_hint in the request, I got the prompt:

    enter image description here

    Hence to resolve the issue, configure login_hint as optional claim for ID token in the Microsoft Entra ID application:

    enter image description here

    Make sure to pass openid and profile scope in the request

    I used the below endpoint to authorize/sign-in the user:

    
    https://login.microsoftonline.com/TenantID/oauth2/v2.0/authorize?
    
    &client_id=ClientID
    
    &response_type=code
    
    &redirect_uri=https://jwt.ms
    
    &response_mode=query
    
    &scope=User.Read openid offline_access profile
    
    &state=12345
    
    

    enter image description here

    Generated tokens using below parameters:

    
    https://login.microsoftonline.com/TenantID/oauth2/v2.0/token
    
    client_id: ClientID
    
    grant_type: authorization_code
    
    scope: User.Read openid offline_access profile
    
    redirect_uri: RedirectURL
    
    code: xxx
    
    client_secret: Secret
    
    

    enter image description here

    Decode the ID token, you will find login_hint:

    enter image description here

    Make use of below request to logout from Microsoft Entra ID application without prompt:

    
    https://login.microsoftonline.com/TenantID/oauth2/v2.0/logout?id_token_hint=IDTOKEN&post_logout_redirect_uri=REDIRECTURL&logout_hint=LoginHintValueFromIDToken
    
    

    The user logged out successfully without any account selection prompt:

    enter image description here

    And you will be redirected to the redirect URL page without any prompt to select account to logout. Hope this helps!

    If this answer was helpful, please click "Accept the answer" and mark Yes, as this can be beneficial to other community members.

    User's image

    If you have any other questions or still running into more issues, let me know in the "comments" and I would be happy to help you.


0 additional answers

Sort by: Most helpful

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.