Hello Admin User,
Thank you for posting your query on Microsoft Q&A.
We understand that you are not able to login to Azure VM with Entra ID credentials after re-creating Domain Services in the cloud, but able to login with local credentials of VM.
Please find below the pre-requisites for VM to be able to login with Entra credentials.
Network requirements
To enable Microsoft Entra authentication for your Windows VMs in Azure, you need to ensure that your VM's network configuration permits outbound access to the following endpoints over TCP port 443.
Azure Global:
https://enterpriseregistration.windows.net: For device registration
http://169.254.169.254: Azure Instance Metadata Service endpoint
https://login.microsoftonline.com: For authentication flows.
https://pas.windows.net: For Azure RBAC flows.
Authentication requirements
Microsoft Entra Guest accounts can't connect to Azure VMs or Azure Bastion enabled VMs via Microsoft Entra authentication.
You need to assign one of the following Azure roles to determine who can sign in to the VM
• Virtual Machine Administrator Login: Users who have this role assigned can sign in to an Azure virtual machine with administrator privileges.
• Virtual Machine User Login: Users who have this role assigned can sign in to an Azure virtual machine with regular user privileges.
If you are creating a Windows VM through Azure portal, please make sure to enable the Microsoft Entra login option for the VM by following the below mentioned steps.
On the Management tab, select the Login with Microsoft Entra ID checkbox in the Microsoft Entra ID section.
Please refer to the below Screenshot for your reference.
Make sure that System assigned managed identity in the Identity section is selected. This action should happen automatically after you enable login with Microsoft Entra ID.
Note
If the legacy Per-user MFA is Enabled/Enforced for your user account, please make sure to disable the Per-User MFA by following the below mentioned steps.
To change the per-user Microsoft Entra multifactor authentication state for a user, complete the following steps:
Sign in to the Microsoft Entra admin center as at least an Authentication Policy Administrator.
- Browse to Identity > Users > All users.
- Select a user account, and then select Per-user MFA.
- Search for the affected user and check the Per-user MFA status. If it is enabled, please select Disable MFA.
Finally, install the Microsoft Entra login VM extension to enable Microsoft Entra login for Windows VMs.
You can install the AADLoginForWindows extension on an existing Windows Server 2019 or Windows 10 1809 and later VM to enable it for Microsoft Entra authentication.
The following example uses the Azure CLI to install the extension:
az vm extension set --publisher Microsoft.Azure.ActiveDirectory --name AADLoginForWindows --resource-group myResourceGroup --vm-name myVM
Please refer the below document
https://learn.microsoft.com/en-us/entra/identity/devices/howto-vm-sign-in-azure-ad-windows
I hope this information is helpful. Please feel free to reach out if you have any further questions.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".