login.microsoftonline.com/common/oauth2/v2.0/logout?post_logout_redirect_uri does not use the provided redirect URI

Abdalla Dimes 20 Reputation points
2023-06-19T13:41:45.08+00:00

im using Microsoft OAuth2 to authorize users and obtain access and refresh tokens, in some cases I need the user to logout form the application, I used the redirect URI in the authorization process and it worked fine, and after the user successfully sign in, the popup redirects to the redirect_uri that I've provided, but when I used

`https://login.microsoftonline.com/common/oauth2/v2.0/logout?post_logout_redirect_uri=${encodeURIComponent(logoutRedirectUri)}`

after the user clicks logout I show a popup with the above URL, it only shows the below popup without redirecting whatsoever

Screenshot 2023-06-19 152924

I've made sure that the 'post_logout_redirect_uri' matches one of the redirect URIs that I added to azure, also I made sure that everything is correct, what should I do in order to redirect the user after successfully singing out?

Microsoft 365 and Office | Development | Office JavaScript API
Microsoft Security | Microsoft Authenticator
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 46,371 Reputation points
    2023-06-21T03:11:30.32+00:00

    Hi @Abdalla Dimes

    Make sure your logout redirect URL is registered in "Redirect URIs" instead of "Front-channel logout URL".

    Later, after you end the session, the page will redirect to the URL you registered in "Redirect URIs".

    User's image

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    1 person found this answer helpful.

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.