Closed yolossn closed 1 year ago
Hi @yolossn, I wasn't able to reproduce your error. Please share your MSAL configuration and MSAL logs. What do you mean by a personal Azure account? is it @live.com, @outlook.com etc.?. If you can provide a fiddler trace, that will be very helpful.
Hey, I am using my @outlook.com
email to login. I use the same MSAL config that is provided in the example. Just changed the clientId
and authority to 'https://login.microsoftonline.com/common
.
Because you're using a multi-tenant with a Microsoft account (a guest user to the tenant), the tokens may be from the wrong authority. Try overriding the default authority in the token request by using the tenantId where you invited the guest user instead of their home tenant, which is the default, as shown below:
const request = {
scopes: protectedResources.armTenants.scopes,
account: account,
authority: `https://login.microsoftonline.com/{tenantIdWhereUserWasInvited}`,
};
const { login, result, error } = useMsalAuthentication(InteractionType.Popup, {
...request,
redirectUri: '/redirect.html',
});
For more information, check the following dynamic auth request.
Thanks for the reply, We are building a tool for any Azure user to login using their azure account and manage their K8s clusters, we want the user to access and manage the resources in their tenant. Something similar to this VSCode addon for Azure K8s.
@yolossn No worries; please let me know if you need any additional guidance.
@yolossn closing issue due to inactivity
Issue
When I run the 2-Authorization-I>2-call-arm>SPA example and login with my personal Azure account, I get the following error when I click on
Tenants
tab.Error:
This issue is for the sample
Other:
Acquire a Token and call ARM API
This issue is for a
Minimal steps to reproduce
2-Authorization-I/2-call-arm/SPA
example.http://localhost:3000/
Tenants
menuAny log messages given by the failure
Library version
Browser and version