Azure VM (Failing to login with AAD password) PIN works...

Corey Mechalske 60 Reputation points
2025-06-11T22:12:26.9333333+00:00

Came across a frustrating issue when trying to RDP or use Bastion via my AAD credentials. Keeps telling me my password is incorrect; however, it lets me log in with my PIN. I have all the proper extensions installed on my VM to be able to use my AAD credentials.

Copilot said this: ✅ Your VM is Azure AD Joined

  • IsDeviceJoined : YES
  • IsUserAzureAD : YES

However, there are a couple of red flags:


⚠️ Potential Issues

  1. DeviceEligible : NO

This means the device is not eligible for automatic MDM enrollment, which could affect conditional access or token acquisition.

  1. CertEnrollment : none and PreReqResult : WillNotProvision

These suggest that the device is not provisioning a Primary Refresh Token (PRT), which is required for AAD-based SSO and Bastion login.


🛠️ Suggested Fixes

✅ 1. Check Conditional Access Policies

Ensure there are no Conditional Access policies blocking token issuance or requiring compliant devices.

✅ 2. Enable PRT and MDM Enrollment

You may need to:

  • Assign an Azure AD Premium license to the user.
  • Ensure Intune MDM auto-enrollment is configured.
  • Reboot the VM and sign in again with an AAD user to trigger token provisioning.

✅ 3. Try Manual AAD Login via RDP

As a workaround, try connecting to the VM using the Remote Desktop client with AAD credentials:

  • Use the VM’s public IP (if available) or connect via Bastion in the portal.
  • Format the username as: AzureAD\yourUPN (e.g., AzureAD\******@yourdomain.com) ✅ Your VM is Azure AD Joined
    • IsDeviceJoined : YES
    • IsUserAzureAD : YES
    However, there are a couple of red flags: ⚠️ Potential Issues 1. DeviceEligible : NO This means the device is not eligible for automatic MDM enrollment, which could affect conditional access or token acquisition. 2. CertEnrollment : none and PreReqResult : WillNotProvision These suggest that the device is not provisioning a Primary Refresh Token (PRT), which is required for AAD-based SSO and Bastion login. 🛠️ Suggested Fixes ✅ 1. Check Conditional Access Policies Ensure there are no Conditional Access policies blocking token issuance or requiring compliant devices. ✅ 2. Enable PRT and MDM Enrollment You may need to:
    • Assign an Azure AD Premium license to the user.
    • Ensure Intune MDM auto-enrollment is configured.
    • Reboot the VM and sign in again with an AAD user to trigger token provisioning.
    ✅ 3. Try Manual AAD Login via RDP As a workaround, try connecting to the VM using the Remote Desktop client with AAD credentials:
    • Use the VM’s public IP (if available) or connect via Bastion in the portal.
    • Format the username as: AzureAD\yourUPN (e.g., AzureAD\******@yourdomain.com)
Microsoft Security | Microsoft Entra | Other
{count} votes

Accepted answer
  1. Kancharla Saiteja 5,890 Reputation points Microsoft External Staff Moderator
    2025-07-03T17:30:30.2933333+00:00

    Hi Corey Mechalske,

    Based on your query, we understand that you are unable to sign in for Azure VM.

    We have disabled per user MFA and enabled conditional access policy for user by excluding Azure Windows VM sign in application which eventually worked, and user is able to sign in.

    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".

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.