Can you create tenants via API etc?

Dan Tracey 20 Reputation points
2023-07-26T22:19:33.21+00:00

I have a business need where I need to create a lot of tenants (hundreds) in one go and assign permissions etc.

I have been looking at some APIs and doing some Postman tests in my Azure AD test environment and cannot seem to find anything that will work.

Is this possible to create multiple tenants via an API or any other form of automation?

I have tried - Directory Tenants - Create Or Update and seen a recommendation to try using the following API - POST https://graph.microsoft.com/beta/organization.

Please can someone help with this or point me in the right direction to achieve this goal?

Happy to explore any technologies/languages that could help achieve this.

Thanks,

Dan

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,066 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,274 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 45,261 Reputation points
    2023-07-27T06:32:38.2466667+00:00

    Hi @Dan Tracey

    Creating or deleting Azure AD tenants using the graph API is not currently supported, only read and update operations are supported.

    User's image

    You must go through the Azure portal to create an Azure AD tenant.

    User's image

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.