How to create Azure Directory(Tenant) dynamically from C# application

Jignesh Patel 21 Reputation points

I would like to create Azure Directory(Tenant) dynamically from C# application. Is it possible if yes then do we've any reference links?

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,390 questions
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,678 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,852 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alan Kinane 16,796 Reputation points MVP

    This might help if you are using the Partner Center API:

    0 comments No comments

  2. JamesTran-MSFT 36,481 Reputation points Microsoft Employee

    @Jignesh Patel
    Thank you for your post!

    Unfortunately, it's not possible to create an Azure Active Directory (Azure AD) tenant using C#. As of right now, the only way to create an Azure AD tenant would be through the Azure Portal. For more info - Create a new tenant in Azure Active Directory.

    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.