Azure Virtual Desktop deployment error message: AAD Join failed with status code: -2145648526.

Gregor Anton Grinč 171 Reputation points
2023-02-24T14:19:12.9433333+00:00

Hello,

I am trying to create Azure Virtual Desktop by only utilizing Azure AD (No AD DS or Azure AD DS). In the documentation, I found that it should be possible: Screenshot 2023-02-24 at 14.10.18

However, when I try to deploy my Azure Virtual Desktop I encounter this issue:

Screenshot 2023-02-24 at 14.56.51

With error message like this:

{
    "status": "Failed",
    "error": {
        "code": "VMExtensionProvisioningError",
        "message": "VM has reported a failure when processing extension 'AADLoginForWindows'. Error message: \"AAD Join failed with status code: -2145648526. Device successfully unjoined from Azure AD.\"\r\n\r\nMore information on troubleshooting is available at https://aka.ms/vmextensionwindowstroubleshoot "
    }
}

Do you have any idea what could be wrong? I have tried to find a solution but so fat I have been unsuccessful...

Thank you

Gregor

Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Durkan 12,251 Reputation points MVP
    2023-02-24T14:29:45.5533333+00:00

    Hi

    try creating your Host Pool first without creating Session Hosts. Then do the following:

    • Navigate to Host Pool -> Select the Hostpool where Azure AD joined VMs are located.
    • Click on RDP properties.
    • Click on … button and select Advanced button.
    • Enter targetisaadjoined:i:1 as the last custom properties and click Save.

    Once this is done, go back in and create your Session Hosts in AVD as AAD-joined devices. You can follow my blog post here which may help:

    https://michaeldurkan.com/2022/05/17/100daysofcloud-day91-azurevirtualdesktopdemo-part1/

    Hope this helps,

    Thanks

    Michael Durkan

    • If the reply was helpful please upvote and/or accept as answer as this helps others in the community with similar questions. Thanks!
    2 people found this answer helpful.
    0 comments No comments

Your answer

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