Cannot connect to Azure VM using Entra ID

Ji Pattison-Smith 20 Reputation points
2024-08-16T14:49:23.3833333+00:00

I have started to enable Entra ID login on some Azure Virtual Machines within my subscription, however I am not able to login to one of them. I've run the az vm extension set command in the same way as the other machines (as per https://learn.microsoft.com/en-gb/entra/identity/devices/howto-vm-sign-in-azure-ad-windows), however when I try to login with my Entra ID user I get the following error:

A certification authority could not be contacted for authentication. If you are using a Remote Desktop Gateway with a smart card, try connecting to the remote computer using a password. For assistance, please contact your system administrator or technical support.

I have checked the event viewer on the VM (I'm still able to log in using the machine's admin account) and it essentially just says the username or password is wrong.

I've tried the suggested troubleshooting steps (https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/cannot-connect-rdp-azure-vm#2) but no joy. Any help or further steps I could try would be much appreciated!

The machine is on Windows 11 22H2.

Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

Accepted answer
  1. Givary-MSFT 35,621 Reputation points Microsoft Employee Moderator
    2024-08-19T07:58:17.4666667+00:00

    @Ji Pattison-Smith I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue: have started to enable Entra ID login on some Azure Virtual Machines within my subscription, however I am not able to login to one of them. I've run the az vm extension set command in the same way as the other machines (as per https://learn.microsoft.com/en-gb/entra/identity/devices/howto-vm-sign-in-azure-ad-windows), however when I try to login with my Entra ID user I get the following error:

    A certification authority could not be contacted for authentication. If you are using a Remote Desktop Gateway with a smart card, try connecting to the remote computer using a password. For assistance, please contact your system administrator or technical support.

    I have checked the event viewer on the VM (I'm still able to log in using the machine's admin account) and it essentially just says the username or password is wrong.

    I've tried the suggested troubleshooting steps (https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/cannot-connect-rdp-azure-vm#2) but no joy. Any help or further steps I could try would be much appreciated!

    The machine is on Windows 11 22H2.

    Resolution: Resolved by @Ji Pattison-Smith - solution here was to turn on System assigned managed identity in the Azure portal.

    If you have any other questions or are still running into more issues, please let me know. Thank you again for your time and patience throughout this issue.

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    1 person found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Konstantinos Passadis 19,586 Reputation points MVP
    2024-08-17T16:03:46.2866667+00:00

    Hello @Ji Pattison-Smith

    Change the RDP as per instructions and in the login add:

    AzureAD******@domain.com

    This will let you login !

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards

    2 people found this answer helpful.
    0 comments No comments

  2. Konstantinos Passadis 19,586 Reputation points MVP
    2024-08-16T15:58:13.5833333+00:00

    Hello @Ji Pattison-Smith

    Follow the additional steps from here :

    https://www.cloudblogger.eu/2023/01/13/azure-vm-azure-ad-join/

    It is my Blog and this method works

    You have to edit the RDP and add the IAM Roles as well

    --

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards


  3. Ji Pattison-Smith 20 Reputation points
    2024-08-19T07:35:22.7966667+00:00

    The solution here was to turn on System assigned managed identity in the Azure portal.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.