Auto signing out of MS Teams(web) when signing out from a web application using microsoft middleware

Copper Contributor

I've made a web application which is using microsoft middleware and through that I'm acquiring access token based on which I'm calling the graph APIs. At the logout button of my web application, I've put this url - https://login.microsoftonline.com/common/oauth2/logout?client_id=<client-id>&post_logout_redirect_ur.... After clicking on this button I'm getting logged out of my web application but also I'm getting logged out of MS Teams (web). I only want myself to be logged out of my web application but not from the msteams. How can I achieve this functionality

 

P.S. - I'm logging in from same account and in same web browser in both msteams web and the web application

1 Reply

Hey @hardikverma ,

 

A developer might be better suited to answer this but I see one challenge with the approach so thought of sharing it with you, When you create a session with Microsoft Identity platform you are sort of creating a centralized session, end of the day you are establishing a session with Azure active directory and all the other apps Teams/Exchange are feeding off the same session, which is why when you are logged in to office 365 portal in one tab and you open email in other tab it leverages the same session. So ideally when you are killing a session you are killing it against the Microsoft Identity platform and thus being signed out of other apps as well. Here are a few articles talking about a similar sign out process : 

https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-web-app-sign-user-sign-in?t...

https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc#send-a-sign-out-re...

If you do figure out a way to achieve this, please do share it.

 

Thanks