简体   繁体   中英

Scope Issue with Azure Active Directory B2C

I started to study a little bit Azure AD B2C and I was following this tutorial. I'm able to login/logout and I can correctly see the list of the "logged" users in the "Users and Groups" blade (on the azure portal). So I'm thinking that everything is working well. In the " msal.service.ts " I'm using the following configuration:

tenantConfig = {
  tenant: "brianennotest.onmicrosoft.com",
  clientID: '7c94b737-786c-4e1c-9231-0a0d803ac47c',
  signUpSignInPolicy: "B2C_1_SiUpIn",
  b2cScopes: [""] };

As you can see I left an empty array in the b2cScopes. There I've the error:

AADB2C90055: The scope 'openid profile' provided in request must specify a resource, such as ' https://example.com/calendar.read '.

I thought I can't leave it blank so I used:

b2cScopes: ["https://brianennotest.onmicrosoft.com/TestB2C/user_impersonation"]

but I received another error that says:

Unhandled Promise rejection: Cannot find primary outlet to load 'HomeComponent' ; Zone: angular ; Task: Promise.then ; Value:

Can I have some help? I already tried to read the following thread but didn't help. Thanks

Your error is not related to b2c but to Angular itself, you need to add a

<router-outlet></router-outlet> 

tag in your app component file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM