本文介绍了Azure B2C:如何在令牌中不返回自定义属性而不将它们作为注册属性的一部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在B2C实例中创建了自定义属性,并将其添加到登录"或注册"策略中,但是我注意到,只有它们是注册属性"的一部分,它们才会以令牌形式返回.如果我将它们从注册"中删除,仅将它们作为一部分 在应用程序声明"中,它们不随令牌一起返回.不过,我可以使用Graph API查询它们,但目标是设置我不想成为注册经验一部分但希望获得令牌的角色和其他信息,以便我保存 额外调用Graph API.

I have created custom attributes in my B2C instance and have added them to my Sign In or Up policy but I noticed that they are only returned in the token if they are part of the Signup Attributes. If I remove them from Signup and only have them as part of the Application Claims, they do not return with the token. I can however query them with Graph API but the goal is to set Roles and other information that I do not want to be part of the signup experience but would like back with the token so I can save the extra calls to Graph API.

实现此目标的最佳方法是什么,或者这是一个错误?

What is the best way to achieve this or is this a bug?

推荐答案

详细了解内置策略这里

Read more about build-in policies here


这篇关于Azure B2C:如何在令牌中不返回自定义属性而不将它们作为注册属性的一部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 01:04