Navigate to the NMM App Service in your Azure subscription. It will be called web-admin-portal-xxxx.
In the menu on the left, choose "Custom domains"
Copy the app service's default domain (for example web-admin-portal-iuhxyaayl5iiy.azurewebsites.net)
Create a new CNAME record in your domain's public DNS zone for the custom domain you want to add. (For example, nmm.mydomain.com). This CNAME record should point to the existing app's URL with the following configurations:
Record Type: CNAME
Value: <the app service default URL>
TTL: 1800 (or your preferred default)
After the DNS record is created, click the "+" button labeled "Add custom domain" in the app service.
Enter your custom domain and click "Validate" button. If the CNAME record was recently created, you may need to wait 1-2 minutes before validation succeeds.
After validation succeeds, click the "Add custom domain" button to finish adding the domain.
To ensure traffic to the new domain is secure, click "Add binding" under SSL binding:
Click "Upload PFX Certificate" to provide the export of your certificate file:
You may also purchase an SSL certificate through Azure, by navigating to the App Service's TLS/SSL Settings and selecting "Buy Certificate"
Once the certificate is uploaded, associate the new domain to the certificate and click "Add Binding" button:
Now navigate to Azure Active Directory -> App Registrations and find the web admin portal application. If the Web Admin Portal (web-admin-portal-xxxx) application is not shown, ensure "All Applications" is clicked. This screen may default to "Owned Applications".
In the menu on the left, select the "Authentication" tab.
Under Redirect URIs, do not remove the original URL, but do add URIs for your custom domain, e.g.: https://nmm.mydomain.com/ https://nmm.mydomain.com/signin-oidc https://nmm.mydomain.com/add-account
Click "Save" option
Verify that your custom domain for NMM works by navigating to https://<your custom domain>/