简体   繁体   English

在 B2C 策略中从 CosmosDB 获取自定义声明

[英]Obtain custom claims from CosmosDB in B2C policy

We need to have a custom B2C policy to obtain custom claims from cosmosDB.我们需要有一个自定义 B2C 策略才能从 cosmosDB 获取自定义声明。 Can someone suggest some pointers to get started on this?有人可以提出一些建议来开始这件事吗?

Thanks谢谢

You will need to use a combination of the Identity Experience Framework (Custom Policies) and a "RESTful technical profile" (ie. Azure Function) to connect to, and return the claims that you have stored within CosmosDB.您将需要结合使用Identity Experience Framework (自定义策略)和“RESTful 技术配置文件”(即 Azure 函数)来连接并返回您存储在 CosmosDB 中的声明。

Documentation for the Identity Experience Framework and the REST Technical Profile should get you started. 身份体验框架REST 技术配置文件的文档应该可以帮助您入门。

Or, I recommend reviewing the following sample: https://github.com/azure-ad-b2c/samples/tree/master/policies/rest-api-idp或者,我建议查看以下示例: https://github.com/azure-ad-b2c/samples/tree/master/policies/rest-api-idp

Final note: I know that User Flows have a concept called API Connectors in preview mode that might help you avoid migrating to custom policies.最后一点:我知道User Flows在预览模式下有一个名为API Connectors的概念,它可能会帮助您避免迁移到自定义策略。

More information: https://docs.microsoft.com/en-us/azure/active-directory-b2c/api-connectors-overview更多信息: https://docs.microsoft.com/en-us/azure/active-directory-b2c/api-connectors-overview

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

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