How to delete custom domain from azure AD

sns 9,246 Reputation points
2023-06-10T15:31:18.9633333+00:00

I want to remove custom domain, however i see following delete option is grade out

Please suggest.

User's image

Microsoft Security Microsoft Entra Microsoft Entra ID
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Manu Philip 20,206 Reputation points MVP Volunteer Moderator
    2023-06-10T17:16:15.6633333+00:00

    Make sure that the custom domain is not set as the primary domain in your Azure AD. You can't delete a primary domain. The primary domain is the default domain name for a new user when you create a new user. Setting a primary domain name streamlines the process for an administrator to create new users in the portal. This implicitly indicated that the primary domain could not be removed as the new user will inherit the domain or the existing users has a domain suffix associated with that domain

    If the above point is covered, attend the following requirements

    Before deleting a custom domain, you must make sure the following:

    • Remove any user with a username, email address, or proxy address using the custom domain name
    • Remove any group which has an email address or proxy address using the custom domain name
    • Remove any application in your Azure AD that uses the custom domain name

    --please don't forget to upvote and Accept as answer if the reply is helpful--


  2. Givary-MSFT 35,621 Reputation points Microsoft Employee Moderator
    2023-06-12T03:45:46.0933333+00:00

    @sns Thank you for reaching out to us, reviewed the above conversation, As i understand you are trying to delete a custom domain within Azure AD, in order to delete a custom domain from Azure Active Directory (Azure AD) using PowerShell, login as a Global admin and run this cmdlet Remove-AzureADDomain -Name Contoso.com

    Regarding the tenant deletion, refer to this article - https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/directory-delete-howto

    Regarding app registrations, would recommend running this cmdlet from PowerShell - Get-AzureADApplication to view the list of applications registered in your Azure AD.

    If above info doesnt help, feel free to post back or send me an email to 'AzCommunity@microsoft.com' with Sub - Attn: Givary and following details in the email body:

    Link to this thread/post & we can connect offline and discuss further on this.

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

    0 comments No comments

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.