How do I retrieve the azure b2c account name

415 Views Asked by At

I am experimenting with the following example: active-directory-b2c-javascript-msal-singlepageapp. I am able to get signed in. However I am getting User 'undefined' logged-in.

enter image description here

I get this on both the Azure b2c instance I created as well as the example. Is there a property that needs to be set somewhere? For example I noticed that the client side code contains scopes:

const loginRequest = { scopes: ["openid", "profile"], };

Do I set to set these properties somewhere in azure?

1

There are 1 best solutions below

0
On BEST ANSWER

Can you make sure the "Display Name" attribute is issued as the "name" claim in the Azure AD B2C token.

In B2C Built in Policy the "Application claims" settings the "Display Name" is selected or not.

enter image description here