Custom Domain for Azure AD

Microsoft Azure – Configure Custom Domain for Azure AD

This article is about how you can configure your custom domain to Microsoft Azure AD so that you can use your domain for business purpose.

Requirements to configure custom domain for Azure AD:

  1. ►Your domain
  2. ►Premium License (P1 or P2)

Custom Domain Registration

  • ►Go to www.freenom.com [Domain registrar]
  • ►Register for an account.
  • ►Go to https://my.freenom.com/domains.php
  • ►Please enter a domain you want but remember to use the TLD such as .tk .ml as they are free of cost.
  • ►Enter a domain like AzureFun.tk
  • ►Click on Checkout and click on Continue.
  • ►You should see the page as below:

Azure Premium License​

If you do not have a premium license, you will for sure get an error while you add a custom domain, so you need to have an Azure Tenant with a subscription attached to it, and then you need to go to licenses in the Tenant as below :

You can see that I already have a Premium P2 license to configure my custom domain now, but if you do not have one, click on it. “Try/Buy” and click on activate the free trial, and you will be able to use P2 License.

Configuring Custom domain for Azure AD​

Step -1:

  • ► Go to your Azure AD by using the search bar.
  • ►Now click on “Custom domain names” on the bar of the left side
Custom Domain
Custom Domain
  • ►Click on Add custom domain, which appears on the top, then Enter your custom domain name that you made in freenom; in my case, it is “azurefun.tk” (Enter without quotations).
  • ►Click on Add domain, and you will see the below:
TXT record
TXT record
  • ►Click on MX, i.e., MX is a DNS record used to verify our domain’s ownership.
  • ►So you should see this when you click on “MX.”
MX record
MX record
  • ►Now, copy all those details in a notepad, i.e., the hostnamedestinationTTL, and Priority. You need to enter all of these details in your Azure DNS Zone. Keep this tab open for now.
  • ►Now, add a new tab in google chrome and go to the search bar of Azure and enter DNS Zones.
Search
Search
  • ►Click on it and click on Add and choose a Resource group and enter Name as “azurefun.tk”, in your case, it should be your domain name that you bought for free in freenom.
DNS Zone
DNS Zone
  • ►Click on Review+Create and Go to the DNS Zone created.
  • ►Click on +Record Set and add the details you have copied before, i.e., the MX record details.
Add MX record to DNS Zone
Add MX record to DNS Zone
  • ►Click on Ok after you enter the details. Now you have successfully added the MX record to the DNS zone of azurefun.tk in Azure.

Step – 2:

  • ►Now, since we have added the MX record in Azure DNS Zone, we need to copy the DNS Servers of Azure now and paste them in the “Nameservers” settings of the Freenom domain.
  • ►So go to your DNS Zone again in Azure, and you should see the nameservers as below:
Azure DNS
Azure DNS
  • ►Go to Freenom now and go to your domain and copy each Azure Nameservers and paste them in your freenom domain Nameserver settings.
Managing Domain in Freenom
Managing Domain in Freenom
  • ►Click on Management tools, and you should see Nameservers.
  • ►Click on use custom nameservers, and you should see this:
Nameservers
Nameservers
  • ►Click on Change Nameservers, and you will see the saved changes.
  • ►Now go to the tab which you left at the start, i.e., the verify domain tab
Verify Domain
Verify Domain
  • ►Click on Verify now, and you should see this.
Done
Done
  • ►We have successfully added our custom domain to Azure AD now. You can verify directly by going to Users in Azure AD and click on Create New User, and you should see it as below:
Checking
Checking
  • ►So now, we have seen that we can create new users with the custom domain we have added just now.

I also run a small youtube channel on some exciting topics, do look into it 🙂

https://www.youtube.com/channel/UCBO2LHhj4-SYejcaE3YfuNg

With this, I conclude this article. Stay tuned for more exciting articles!

Leave a Reply

%d bloggers like this: