简体   繁体   English

在角度应用程序中获取Azure B2C自定义声明

[英]Get azure b2c custom claims in angular application

I have custom claim say email . 我有自定义声明说电子邮件。 I use hello js to login from a angular app. 我使用hello js从有角度的应用程序登录。

var authResponse = hello(helloNetwork.adB2CSignInSignUp).getAuthResponse();

The above code gives me the token but i am not getting the email claim that i have added. 上面的代码给了我令牌,但是我没有收到我添加的电子邮件声明。

How can I get the custom claim that i have configured . 如何获得我已配置的自定义声明。

In order to get custom claims, you need to edit the policy and select "Email address" under the Application Claims blade. 为了获得自定义声明,您需要编辑策略并在“应用程序声明”刀片下选择“电子邮件地址”。 (See image in link below) (请参见下面链接中的图像)

Please verify that is enabled for the policy that you are calling. 请验证您正在调用的策略已启用。 If you have it enabled and it still doing that, can you please send a screenshot of the portal and a resulting token (that does not have the email address claim). 如果您启用了该功能,并且仍在执行该操作,请发送门户的屏幕截图和生成的令牌(不包含电子邮件地址声明)。

Screenshot of azure portal 天蓝色门户的屏幕截图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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