I'm trying to use MSAL with angular
to query the list of tenants available to a user. I was previously successfully using adal.js
.
This is the request URL: https://management.azure.com/tenants?api-version=2019-11-01
MSAL successfully injects a bearer token into the request.
However, I see the following error in www-authenticate:
www-authenticate: Bearer authorization_uri="https://login.windows.net/", error="invalid_token", error_description="Could not find identity for access token."
I'm a little confused by this error - login.windows.net
appears to be part of a deprecated authentication flow.
I've got 'https://management.azure.com/', ['user_impersonation']
inside my protectedResourceMap.
I've tried setting the authority to https://login.microsoftonline.com/{tenantId}
as well as the default. The clientId, tenant, etc, have not been changed from ADAL.
Any idea what's going wrong here?