Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure AD Logout URL not redirecting

I am building the following URL

https://login.microsoftonline.com/<tenantid>/oauth2/logout?client_id=<clientId>&post_logout_redirect_uri=<encodedurl>

It looks something like

https://login.microsoftonline.com/f4aaf6e1-ffff-ffff-bb63-4e8ebf728113/oauth2/logout?client_id=f562b4e3-ffff-ffff-b4bb-49ca64216e75&post_logout_redirect_uri=https%3A%2F%2Fmyazureapp.azurewebsites.net

It logs me out but does not redirect me back to my app

Like this URL does for azure

https://login.microsoftonline.com/common/oauth2/logout?post_logout_redirect_uri=https%3a%2f%2fmanage.windowsazure.com%2fSignOut%2fComplete

I have looked at the suggested related Q's and I have tried a few variations.

Edit it turned out to be an intermitted issue which I guess was due to some cookies / other state not be reset when I was doing my dev / test cycles. With a fresh browser it works. When it works the sign out screen says something like "Hang on a moment while we sign you out" then it redirects, when it does not work the screen says "you have been signed out, please close your browser"

like image 437
Steve Drake Avatar asked Aug 29 '17 09:08

Steve Drake


1 Answers

Set the Logout URL property in your AD application.

  1. Log into the AAD admin center portal
  2. Go to App registrations as shown enter image description here
  3. Select your AD application
  4. Go to Properties
  5. Update your intended application logout redirection URL as shown enter image description here
  6. Save
like image 72
juvchan Avatar answered Oct 20 '22 06:10

juvchan