You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As my current project structure need support different client Id, we assume user will need to relogin everytime select different client Id, however in V3 we try initialize before call loginRedirect below and can't get msal:loginSuccess event by subscribe to msalBroadcast:
this.msalBroadcastService.msalSubject$.subscribe((result: EventMessage) => {
console.log(result)
})
// this function call from user select dropdown list clientId value
async setApplicationAndRedirect(clientId: string) {
await this.initializeMsalService(clientId)
this.msalInstance.loginRedirect()
}
initializeMsalService(clientId: string): void {
var msalConfiguration = this.configService.getSettings("msal")
msalConfiguration.auth["clientId"] = clientId // to replace new clientId from user input selected clientId
this.msalInstance = new PublicClientApplication(msalConfiguration)
// Await initialization
await this.msalInstance.initialize()
}
May I know is it not the normal behavior that MSAL V3 support multiple client Id?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi MSAL team, currently I'm upgrading from V2 to V3 and encounter initialization error before calling MSAL API and found this :
https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/v2-migration.md
As my current project structure need support different client Id, we assume user will need to relogin everytime select different client Id, however in V3 we try initialize before call loginRedirect below and can't get msal:loginSuccess event by subscribe to msalBroadcast:
May I know is it not the normal behavior that MSAL V3 support multiple client Id?
Beta Was this translation helpful? Give feedback.
All reactions