问题描述
是否可以通过编程方式创建用户以使用Azure AD B2C进行测试?创建我了解的用户的唯一方法是通过网站注册.我想念什么吗?
Is there a way to programmatically create users for testing with Azure AD B2C? The only way to create users that I am aware of is through website signup. Am I missing something?
推荐答案
是的,Azure AD B2C Graph API允许对用户执行CRUD操作.
Yes, Azure AD B2C Graph API allows CRUD operations on users.
您可以通过向/users端点发送"POST"请求来创建用户.
You can create a user by sending a "POST" request to the /users endpoint.
以下文档通过用C#编写的"B2CGraphClient"实用程序对此进行了演示: Azure AD B2C:使用图表(请参阅页面中的GitHub链接以下载示例代码)
请注意,Azure AD B2C中有两种类型的用户帐户:本地帐户"和工作或学校帐户".所需的参数因您所需的帐户类型而异
Please note there are two types of user account in Azure AD B2C : "local accounts" and "work or school accounts".Required parameters vary upon the account type you need.
这篇关于为Azure AD B2C创建测试用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!