Description
Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
4.8.0
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
4.0.7
Public or Confidential Client?
Public
Description
when setting msaljs for an angular standalone app for azure B2C, i set the authority to "https://tenant.b2clogin.com/tenant.onmicrosoft.com/policy/" and i keep getting the following error :
[email protected] : Warning - A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: 400
[email protected] : Error - The CloudInstanceDiscoveryErrorResponse error is invalid_instance.
and the respective 400 from the get to the endpoint discovery
i tried using the authority with the format "https://instance/tfp/tenant/policy" as per recommedation in PublicClientApplication.ts and it does not work either.
please help, i also tried v3 and v4 in an standalone app (angular19) and the same issue
Error Message
[email protected] : Warning - A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: 400
[email protected] : Error - The CloudInstanceDiscoveryErrorResponse error is invalid_instance.
MSAL Logs
No response
Network Trace (Preferrably Fiddler)
- Sent
- Pending
MSAL Configuration
{
auth: {
clientId: '<client_id>',
authority: 'https://<tenant>.b2clogin.com/<tenant>.onmicrosoft.com/B2C_mypol',
knownAuthorities: ['<tenant>.b2clogin.com'],
},
}
Relevant Code Snippets
loginRedirect() {
if (this.msalGuardConfig.authRequest) {
this.authService.loginRedirect({
...this.msalGuardConfig.authRequest,
} as RedirectRequest);
} else {
this.authService.loginRedirect();
}
}
Reproduction Steps
- setup msaljs according to documentation (sample) in https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-samples/angular-standalone-sample
- set authority, clientid and knownAuthorities for msalConfig
- Run the app
Expected Behavior
navigate ti azure bc2 to login the user
Identity Provider
Azure B2C Basic Policy
Browsers Affected (Select all that apply)
Chrome, Firefox, Edge
Regression
No response