A cloud-based identity and access management service for securing user authentication and resource access
Custom VHD with Azure Marketplace Baseline Will Not Join Azure AD Domain
Hello,
My goal is to upload a customized VHD into our cloud-only USGov environment and turn it into an Azure AD-joined template. My challenge is the option to login with Azure AD is disabled.
The image is a Windows 10 Pro x64 21H2 OS originally obtained via Azure Marketplace. It has since been hardened to comply with US government regulations. After hardening the VHD, I followed all the guidelines found in Prepare a Windows VHD or VHDX to upload to Azure and converted the VHD to a fixed size. I am able to upload the VHD to blob storage, and I can create a VM from the VHD, either via managed disk or directly from blob storage. The VM powers on properly, and I can login to it with local credentials and use the system as expected. However, when creating the VM, I am unable to check the box labeled Login with Azure AD, and a warning appears below the checkbox stating:
This image does not support Login with Azure AD.
Troubleshooting steps:
- I have tried generalizing the VM via OS Sysprep, capturing the VM as an image, and creating a new VM from that image. Same result.
- I have tried adding the AADLoginForWindows extension and turned on the System-assigned Identity after creating the VM, then rebooted. Same result.
- I have tried going to Settings > Accounts > Access Work or School > Connect > Join this device to Azure Active Directory, and walking through the credentials wizard with my USGov credentials, then I receive an undefined error. This VM does have outbound internet access and I am able to successfully login to USGov via browser.

- dsregcmd /status reports AzureAdJoined = no

- Windows Firewall has been disabled and turned on with a blanket Allow All Inbound rule. Same result. I'm not sure what else to check here. Any assistance would be greatly appreciated.
Thank you.
