Hi @Malvaro
Thank you for posting this in Microsoft Q&A.
I understand you want to know the way to destroy all sessions of all applications for the user simulating the Single Sign Out.
One way to implement SSO is to use OpenID Connect front-channel logout feature. This feature allows an application to notify other applications that the user has logged out. When the user logs out of one application, the application sends a logout request to all other applications that the user has logged into. The other applications then log the user out as well.
To implement front-channel logout, you need to register the logout endpoints for all your applications with Azure AD Application registration
Add code to your application that listens for logout requests from other applications and logs the user out when a request is received. Sign-out behavior on browsers
Below is the sample code for SPA application.
const config = {
auth: {
clientId: "your_app_id",
redirectUri: "your_app_redirect_uri", //defaults to application start page
postLogoutRedirectUri: "your_app_logout_redirect_uri",
},
};
const myMsal = new PublicClientApplication(config);
// you can select which account application should sign out
const logoutRequest = {
account: myMsal.getAccountByHomeId(homeAccountId),
};
myMsal.logoutRedirect(logoutRequest);
For your reference: https://curity.io/resources/learn/openid-connect-logout/
Hope this helps. Do let us know if you any further queries.
Thanks,
Navya
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.