4
votes

i am unable to logout from my simple azure web app that has Azure active directory as the authentication provider.

the user logs into the site using the AAD login page shown here

but i am struggling to find out how to log the user out.

i tried using the various undocumented logout urls like

https://login.microsoftonline.com/<tennantid>/oauth2/logout

although they report the the user is logged out, it isnt. As returning to the previous URL goes straight thru without a sign page.

i am guessing there are some cookies that need to be cleared but where on earth is all this stuff documented?

any help is most appreciated.

1
Did you try "<your-doman>/.auth/logout" in the browser?prakash
In my case just _signInManager.SignOutAsync() is needed.Dawid Rutkowski
@prakash nope. but i when i did, it worked exactly as i expected. I am happy to accept your post as an answer. thanks very much. where is this documented?lpic

1 Answers

16
votes

Did you try "[your-domain]/.auth/logout"?

I too had a very hard time figuring this out and I found it in the comments of this blog post.

Hope it helps!