While using SSO to sign on Azure using MSAL with Angular, I get redirected this URL: https://login.microsoftonline.com/common//discovery/instance?api-version=1.1&authorization_endpoint=https://login.microsoftonline.com/{tenant}/{organization}.onmicrosoft.com/{policyName}/oauth2/v2.0/authorize endpoint.
... and the response is - 400 bad request error or an invalid_request (in the xhr)
A curl comes back with this error:
"error":"invalid_request","error_description":"AADSTS50050: The request is malformed: invalid format for 'authorization_endpoint'
Why would this happen for new users?
update:
MsalModule.forRoot(
{
auth: {
...
validateAuthority: false,
...
},
...
setting validateAuthority: false resolved this issue for now.
However, setting validateAuthority should not cause problems - this is just a workaround.