Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating test users for Azure AD B2C

Tags:

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?

like image 857
Topanoe Avatar asked Oct 19 '22 03:10

Topanoe


1 Answers

Yes, Azure AD B2C Graph API allows CRUD operations on users.

You can create a user by sending a "POST" request to the /users endpoint.

The following documentation demonstrates this with a "B2CGraphClient" utils written in C# : Azure AD B2C: Use the Graph (see GitHub link in the page to download the sample code)

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.

like image 119
GGES Avatar answered Nov 09 '22 06:11

GGES