简体   繁体   English

Azure B2C - MSAL - 使用更新的声明获取 ID 令牌

[英]Azure B2C - MSAL - Fetch ID Token with updated claims

I am using Azure B2C using built in signup/signin policy to register and sign in user.我正在使用 Azure B2C 使用内置的注册/登录策略来注册和登录用户。 I have a react application, in which I have implemented the flow using msal library.我有一个反应应用程序,其中我使用 msal 库实现了流程。 Now in one of my scenario, I am aware that the claims data has been updated and I want to update my id token in browser order to get the latest claims.现在在我的一个场景中,我知道声明数据已更新,我想在浏览器中更新我的 id 令牌以获取最新声明。 I have tried using acquireTokenSilent but it is not returning token with latest claims.我试过使用acquireTokenSilent,但它没有返回带有最新声明的令牌。

What shall I do in order to get token with latest claims?我该怎么做才能获得具有最新声明的令牌?

Claims are not dynamic.索赔不是动态的。

The only way to do this is to log out and then log in.唯一的方法是注销然后登录。

This is not particuler to B2C.这不是 B2C 的特别之处。 ADFS eg does exactly the same. ADFS 例如完全一样。

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

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