I'm unable to login to Azure Virtual Machine with Azure AD credential even if select the Option Azure AD Domain Joined while creating the Azure VM.
I'm always getting The Logon attempt failed error.
Assigned Azure Virtual Machine Administration User role, but still unable to login to VM with Azure AD user.
Can someone fix my issue.
I tried to reproduce the same in my environment to Login Azure VM with Azure AD Credentials, As I got same error.
I have created Azure VM with Login with Azure AD Option while creating the Virtual Machine.
Azure Portal > Virtual machines > Create
Assign the RBAC role to user for login to VM with Azure AD Credentials.
Assign any role to users.
Virtual Machine Administrator Login- User assigned to this role,Can log in to Azure AD Admin privileges.
Virtual Machine User Login -User assigned this role,Can login in to normal user privileges.
Azure Portal > Virtual machines > Access control (IAM) >Add >Add role assignment
Assigned Virtual Machine User Login role to User
Verify AADLoginForWindows on Virtual Machine like below.
Azure Portal > Virtual machines >Extensions + applications >Extensions
Change the Remote Desktop Settings with Network Level Authentication,Like below
Assign user to Remote Desktop Group using below command.
net localgroup "Remote Desktop Users" /add "AzureAD\u1@gopivallepuoutlook.onmicrosoft.com"
Ex: user VPN:Theja@Testdemo.onmicrosoft.com
Get-LocalGroupMember -Name "Remote Desktop users"
Modify the downlaoded RDP File with below Values and save the file.
enablecredsspsupport:i:0
authentication level:i:2
username:s:Theja@Testdemo.onmicrosoft.com (Add your username here)
domain:s:AzureAD
Finally Logged in with Azure AD (Theja )Credentials.