question

elastiSol-7349 avatar image
0 Votes"
elastiSol-7349 asked HamedurRahiman-2262 answered

Create B2C tenants programmatically

Hi,

Is it possible to use invoke API's, Powershell Runbook or any method to automatically create new tenants?

azure-ad-b2c
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JamesTran-MSFT avatar image
0 Votes"
JamesTran-MSFT answered

@elastiSol-7349
Thank you for your question!

When it comes to automating the creation of new tenants, this currently isn't possible using either APIs or PowerShell, as of right now, you can only create B2C tenants within the Azure Portal.

If you'd like this feature to be implemented, I'd recommend creating a feature request using our User Voice forum.

For more info:
Automate creation of Azure AD B2C Tenants
AzureAD PowerShell commands
GraphAPI Commands


If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.


Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

elastiSol-7349 avatar image
0 Votes"
elastiSol-7349 answered JamesTran-MSFT commented

So what's the best practice for multi-tenant SaaS applications? How can we separate our client resources and Active Directory? We envision creating a separate tenant for each client and would like to do so programmatically.

Should we be using a single "production" instance of B2C and leveraging groups and roles to isolate customers?

Thanks

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@elastiSol-7349
Thank you for the quick follow up!

You can find a full list of B2C best practices and recommendations here. When it comes to managing your B2C environment, it's recommended to roll-out/create separate environments for dev, test, pre-production, and production. When it comes to protecting client resources, I'd recommend leveraging groups and/or AzureAD/RBAC roles in order to control a user's/app's access to resources.


Additional Link:
Manage identity in multitenant applications

I hope this helps!
Thank you again for your time and patience throughout this issue.

0 Votes 0 ·
HamedurRahiman-2262 avatar image
0 Votes"
HamedurRahiman-2262 answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.