How to signout from an Azure Application?

前端 未结 3 1284
渐次进展
渐次进展 2020-12-19 02:36

I have created a Azure AD application and a Web App. The Azure AD Application uses AAD Authentication. This works well. When I go to my URL and I am not authenticated, I hav

3条回答
  •  醉梦人生
    2020-12-19 03:00

    What you can do is construct a sign out URI in your application and when the user clicks on the Logout link or button, you redirect your users to that URI.

    The format of a sign out URI is:

    https://login.microsoftonline.com/{0}/oauth2/logout?post_logout_redirect_uri={1}
    

    Where {0} is the Tenant Id or the Azure AD name (something.onmicrosoft.com) and {1} is the link to your application where a user will be redirected back after the sign out process is complete at Azure AD end.

提交回复
热议问题