Search code examples
vue.jssingle-sign-onmsal.js

How to disable Single sign-on (SSO) with MSAL.js?


I have a issue with MSAL and SSO. I want to disable Single sign-on (SSO) for an intranet Vue 3 SPA application. SPA is using MSAL.js. When the user first logged in an authorized account (which is user account logged to computer.), then, after sign out, if I try with an different authorized Azure AD account, the response of MSAL Popup picked up and returned previous signed in account. I think that it might be related to SSO.

How to disable Single sign-on (SSO) with MSAL.js?


Solution

  • While getting login, in order to disable SSO, I have used prompt option as login instead of select_account as below.

       await msalApp.loginPopup({
            scopes,
            prompt: 'login'
        });