When creating an Azure directory, the default domain ends with the .onmicrosoft.com prefix. This is obviously not always the preferred naming convention, it is therefore possible to purchase the required domain and assign it to your Azure AD.
To begin, scroll down the left hand menu and select Active Directory.
Once Active Directory has been selected, the next step is to click on + NEW and select Directory then Custom Create.
Fill in the name of the directory you wish to create and the country or region you wish the directory to be located in, then click the tick to continue.
Once the directory has been created, click on the directory to open up the dashboard panel to configure the next options.
Click on the Domains menu at the top of the dashboard window.
Once on the Domains window, you will see the default domain name which has been created with the .onmicrosoft.com extension. To assign a custom domain, click Add a Custom Domain which will open the Add Domain wizard.
In the next window, add the name of the custom domain that has been purchased. If it is required, check the I plan to configure this domain for single sign-on with my local Active Directory and then click add.
Once the domain has ben successfully added, click on the arrow to continue to the next page.
The next windows requires the domain to be verified. This is achieved by adding a TXT record to the DNS of the purchased domain, Azure will verify the domain name against this TXT record.
When successfully verified, click the tick button to close the Add Domain wizard.
Now both domain names can be viewed, the original techkb.on.microsoft.com domain and the custom domain of TechKB.onl. Select the custom domain name and then click the Change Primary button on the bottom Azure menu.
On the Change primary domain wizard, check the current primary domain and the new primary domain are correctly selected. If the settings are correct, click on the tick button and the primary domain is switched to the custom domain.
Once the changes have been made, it is possible to view in the domains window, that the primary domain has been changed to the custom domain.
It’s as easy as that!