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

Jignesh Patel 56 Reputation points
2021-10-14T11:56:15.743+00:00

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

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Entra | Microsoft Entra ID
Developer technologies | C#
Developer technologies | C#
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.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alan Kinane 17,356 Reputation points MVP Volunteer Moderator
    2021-10-14T12:12:53.5+00:00

    This might help if you are using the Partner Center API: https://learn.microsoft.com/en-us/partner-center/develop/create-a-customer

    0 comments No comments

  2. JamesTran-MSFT 37,226 Reputation points Microsoft Employee Moderator
    2021-10-14T18:09:43.6+00:00

    @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.


Your answer

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