Azure AD joined and DomainJoinedCheck faild

%3CLINGO-SUB%20id%3D%22lingo-sub-2565889%22%20slang%3D%22en-US%22%3EAzure%20AD%20joined%20and%20DomainJoinedCheck%20faild%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2565889%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI%20created%20an%20Azure%20Virtual%20Desktop%20environment%20with%20a%20connection%20to%20Azure%20AD.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Azure%20AD%20join.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F297062i68AE40D04BB35941%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Azure%20AD%20join.png%22%20alt%3D%22Azure%20AD%20join.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20the%20session%20host%20is%20shown%20as%20%3CSPAN%3Eunavailable%3C%2FSPAN%3E%20in%20the%20environment.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInside%20the%20help%20checks%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%22healthCheckName%22%3A%20%22DomainJoinedCheck%22%2C%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20%22healthCheckResult%22%3A%20%22HealthCheckFailed%22%2C%3CBR%20%2F%3E%22additionalFailureDetails%22%3A%3CBR%20%2F%3E%7B%20%22message%22%3A%20%22SessionHost%20unhealthy%3A%20SessionHost%20is%20not%20joined%20to%20a%20domain%22%2C%3CBR%20%2F%3E%22errorCode%22%3A%20-2147467259%2C%20%22lastHealthCheckDateTime%22%3A%20%222021-07-20T12%3A05%3A23.3158494Z%22%20%7D%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20support.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2569208%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20AD%20joined%20and%20DomainJoinedCheck%20faild%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2569208%22%20slang%3D%22en-US%22%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1695%22%20target%3D%22_blank%22%3E%40Stefan%20Kie%C3%9Fig%3C%2FA%3E%3CBR%20%2F%3EDid%20you%20put%20the%20validation%20environment%20to%20Yes%3F%3CBR%20%2F%3EAre%20session%20hosts%2020h2%3F%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2569330%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20AD%20joined%20and%20DomainJoinedCheck%20faild%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2569330%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Johan%20Vanneuville%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethe%20validation%20environment%20is%20by%20No.%3CBR%20%2F%3EThe%20session%20hosts%20are%2020h2.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2569393%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20AD%20joined%20and%20DomainJoinedCheck%20faild%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2569393%22%20slang%3D%22en-US%22%3EHey%20Stefan%20Kie%C3%9Fig%2C%3CBR%20%2F%3EChange%20your%20hostpool%20to%20Validation%20Environment%20%22Yes%22.%20Without%20it%20the%20feature%20won't%20work.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2569440%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20AD%20joined%20and%20DomainJoinedCheck%20faild%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2569440%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20Johan%20Vanneuville%3CBR%20%2F%3E%3CBR%20%2F%3EI%20start%20all%20over%20and%20redeployed%20it%20with%20%22Validation%20Environment%22%20Yes.%3CBR%20%2F%3EBut%20still%20the%20same%20problem.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2570938%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20AD%20joined%20and%20DomainJoinedCheck%20faild%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2570938%22%20slang%3D%22en-US%22%3EHey%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1695%22%20target%3D%22_blank%22%3E%40Stefan%20Kie%C3%9Fig%3C%2FA%3E%2C%3CBR%20%2F%3Ewhat%20do%20you%20get%20if%20you%20do%20a%20dsregcmd%20%2Fstatus%20on%20the%20machine%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2571316%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20AD%20joined%20and%20DomainJoinedCheck%20faild%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2571316%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20Johan%20Vanneuville%2C%3CBR%20%2F%3E%3CBR%20%2F%3Ethis%20are%20the%20results%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%7C%20Device%20State%20%7C%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%3CBR%20%2F%3EAzureAdJoined%20%3A%20YES%3CBR%20%2F%3EEnterpriseJoined%20%3A%20NO%3CBR%20%2F%3EDomainJoined%20%3A%20NO%3CBR%20%2F%3EDevice%20Name%20%3A%20VDI-0%3CBR%20%2F%3E%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%7C%20Device%20Details%20%7C%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%3CBR%20%2F%3EDeviceId%20%3A%20remove%20ID%3CBR%20%2F%3EThumbprint%20%3A%20remove%20Thumbpring%3CBR%20%2F%3EDeviceCertificateValidity%20%3A%20remove%20Certificate%3CBR%20%2F%3EKeyContainerId%20%3A%20remove%20ContainerID%3CBR%20%2F%3EKeyProvider%20%3A%20Microsoft%20Software%20Key%20Storage%20Provider%3CBR%20%2F%3ETpmProtected%20%3A%20NO%3CBR%20%2F%3EDeviceAuthStatus%20%3A%20SUCCESS%3CBR%20%2F%3E%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%7C%20Tenant%20Details%20%7C%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%3CBR%20%2F%3ETenantName%20%3A%3CBR%20%2F%3ETenantId%20%3A%20remove%20TenantID%3CBR%20%2F%3EIdp%20%3A%20login.windows.net%3CBR%20%2F%3EAuthCodeUrl%20%3A%20%3CA%20href%3D%22https%3A%2F%2Flogin.microsoftonline.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Flogin.microsoftonline.com%2F%3C%2FA%3E%22TenantID%22%2Foauth2%2Fauthorize%3CBR%20%2F%3EAccessTokenUrl%20%3A%20%3CA%20href%3D%22https%3A%2F%2Flogin.microsoftonline.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Flogin.microsoftonline.com%2F%3C%2FA%3E%22TenantID%22%2Foauth2%2Ftoken%3CBR%20%2F%3EMdmUrl%20%3A%3CBR%20%2F%3EMdmTouUrl%20%3A%3CBR%20%2F%3EMdmComplianceUrl%20%3A%3CBR%20%2F%3ESettingsUrl%20%3A%3CBR%20%2F%3EJoinSrvVersion%20%3A%202.0%3CBR%20%2F%3EJoinSrvUrl%20%3A%20%3CA%20href%3D%22https%3A%2F%2Fenterpriseregistration.windows.net%2FEnrollmentServer%2Fdevice%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fenterpriseregistration.windows.net%2FEnrollmentServer%2Fdevice%2F%3C%2FA%3E%3CBR%20%2F%3EJoinSrvId%20%3A%20urn%3Ams-drs%3Aenterpriseregistration.windows.net%3CBR%20%2F%3EKeySrvVersion%20%3A%201.0%3CBR%20%2F%3EKeySrvUrl%20%3A%20%3CA%20href%3D%22https%3A%2F%2Fenterpriseregistration.windows.net%2FEnrollmentServer%2Fkey%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fenterpriseregistration.windows.net%2FEnrollmentServer%2Fkey%2F%3C%2FA%3E%3CBR%20%2F%3EKeySrvId%20%3A%20urn%3Ams-drs%3Aenterpriseregistration.windows.net%3CBR%20%2F%3EWebAuthNSrvVersion%20%3A%201.0%3CBR%20%2F%3EWebAuthNSrvUrl%20%3A%20%3CA%20href%3D%22https%3A%2F%2Fenterpriseregistration.windows.net%2Fwebauthn%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fenterpriseregistration.windows.net%2Fwebauthn%2F%3C%2FA%3E%22TenantID%22%2F%3CBR%20%2F%3EWebAuthNSrvId%20%3A%20urn%3Ams-drs%3Aenterpriseregistration.windows.net%3CBR%20%2F%3EDeviceManagementSrvVer%20%3A%201.0%3CBR%20%2F%3EDeviceManagementSrvUrl%20%3A%20%3CA%20href%3D%22https%3A%2F%2Fenterpriseregistration.windows.net%2Fmanage%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fenterpriseregistration.windows.net%2Fmanage%2F%3C%2FA%3E%22TenantID%22%2F%3CBR%20%2F%3EDeviceManagementSrvId%20%3A%20urn%3Ams-drs%3Aenterpriseregistration.windows.net%3CBR%20%2F%3E%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%7C%20User%20State%20%7C%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%3CBR%20%2F%3ENgcSet%20%3A%20NO%3CBR%20%2F%3EWorkplaceJoined%20%3A%20NO%3CBR%20%2F%3EWamDefaultSet%20%3A%20NO%3CBR%20%2F%3E%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%7C%20SSO%20State%20%7C%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%3CBR%20%2F%3EAzureAdPrt%20%3A%20NO%3CBR%20%2F%3EAzureAdPrtAuthority%20%3A%3CBR%20%2F%3EEnterprisePrt%20%3A%20NO%3CBR%20%2F%3EEnterprisePrtAuthority%20%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%7C%20Diagnostic%20Data%20%7C%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%3CBR%20%2F%3EAadRecoveryEnabled%20%3A%20NO%3CBR%20%2F%3EExecuting%20Account%20Name%20%3A%20VDI-0%5CVDI%3CBR%20%2F%3EKeySignTest%20%3A%20PASSED%3CBR%20%2F%3E%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%7C%20IE%20Proxy%20Config%20for%20Current%20User%20%7C%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%3CBR%20%2F%3EAuto%20Detect%20Settings%20%3A%20YES%3CBR%20%2F%3EAuto-Configuration%20URL%20%3A%3CBR%20%2F%3EProxy%20Server%20List%20%3A%3CBR%20%2F%3EProxy%20Bypass%20List%20%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%7C%20WinHttp%20Default%20Proxy%20Config%20%7C%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%3CBR%20%2F%3EAccess%20Type%20%3A%20DIRECT%3CBR%20%2F%3E%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%7C%20Ngc%20Prerequisite%20Check%20%7C%3CBR%20%2F%3E%2B----------------------------------------------------------------------%2B%3CBR%20%2F%3E%3CBR%20%2F%3EIsDeviceJoined%20%3A%20YES%3CBR%20%2F%3EIsUserAzureAD%20%3A%20NO%3CBR%20%2F%3EPolicyEnabled%20%3A%20NO%3CBR%20%2F%3EPostLogonEnabled%20%3A%20YES%3CBR%20%2F%3EDeviceEligible%20%3A%20NO%3CBR%20%2F%3ESessionIsNotRemote%20%3A%20NO%3CBR%20%2F%3ECertEnrollment%20%3A%20none%3CBR%20%2F%3EPreReqResult%20%3A%20WillNotProvision%3CBR%20%2F%3E%3CBR%20%2F%3EFor%20more%20information%2C%20please%20visit%20%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Faadjerrors%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.microsoft.com%2Faadjerrors%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20login%20only%20with%20local%20administration%20account.%20I%20can%20not%20log%20in%20with%20my%20Azure%20AD%20account.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hello,

I created an Azure Virtual Desktop environment with a connection to Azure AD.

Azure AD join.png

 

But the session host is shown as unavailable in the environment.

 

Inside the help checks:

 

{

    "healthCheckName": "DomainJoinedCheck",
    "healthCheckResult": "HealthCheckFailed",
"additionalFailureDetails":
{ "message": "SessionHost unhealthy: SessionHost is not joined to a domain",
"errorCode": -2147467259, "lastHealthCheckDateTime": "2021-07-20T12:05:23.3158494Z" }
}

 

Thanks for your support.

 

16 Replies
Hi @Stefan Kießig
Did you put the validation environment to Yes?
Are session hosts 20h2?

Hello Johan Vanneuville,

 

the validation environment is by No.
The session hosts are 20h2.

Hey Stefan Kießig,
Change your hostpool to Validation Environment "Yes". Without it the feature won't work.

Hey Johan Vanneuville

I start all over and redeployed it with "Validation Environment" Yes.
But still the same problem.

 

 

Hey @Stefan Kießig,
what do you get if you do a dsregcmd /status on the machine?

Hey Johan Vanneuville,

this are the results:


+----------------------------------------------------------------------+
| Device State |
+----------------------------------------------------------------------+

AzureAdJoined : YES
EnterpriseJoined : NO
DomainJoined : NO
Device Name : VDI-0

+----------------------------------------------------------------------+
| Device Details |
+----------------------------------------------------------------------+

DeviceId : remove ID
Thumbprint : remove Thumbpring
DeviceCertificateValidity : remove Certificate
KeyContainerId : remove ContainerID
KeyProvider : Microsoft Software Key Storage Provider
TpmProtected : NO
DeviceAuthStatus : SUCCESS

+----------------------------------------------------------------------+
| Tenant Details |
+----------------------------------------------------------------------+

TenantName :
TenantId : remove TenantID
Idp : login.windows.net
AuthCodeUrl : https://login.microsoftonline.com/"TenantID"/oauth2/authorize
AccessTokenUrl : https://login.microsoftonline.com/"TenantID"/oauth2/token
MdmUrl :
MdmTouUrl :
MdmComplianceUrl :
SettingsUrl :
JoinSrvVersion : 2.0
JoinSrvUrl : https://enterpriseregistration.windows.net/EnrollmentServer/device/
JoinSrvId : urn:ms-drs:enterpriseregistration.windows.net
KeySrvVersion : 1.0
KeySrvUrl : https://enterpriseregistration.windows.net/EnrollmentServer/key/
KeySrvId : urn:ms-drs:enterpriseregistration.windows.net
WebAuthNSrvVersion : 1.0
WebAuthNSrvUrl : https://enterpriseregistration.windows.net/webauthn/"TenantID"/
WebAuthNSrvId : urn:ms-drs:enterpriseregistration.windows.net
DeviceManagementSrvVer : 1.0
DeviceManagementSrvUrl : https://enterpriseregistration.windows.net/manage/"TenantID"/
DeviceManagementSrvId : urn:ms-drs:enterpriseregistration.windows.net

+----------------------------------------------------------------------+
| User State |
+----------------------------------------------------------------------+

NgcSet : NO
WorkplaceJoined : NO
WamDefaultSet : NO

+----------------------------------------------------------------------+
| SSO State |
+----------------------------------------------------------------------+

AzureAdPrt : NO
AzureAdPrtAuthority :
EnterprisePrt : NO
EnterprisePrtAuthority :

+----------------------------------------------------------------------+
| Diagnostic Data |
+----------------------------------------------------------------------+

AadRecoveryEnabled : NO
Executing Account Name : VDI-0\VDI
KeySignTest : PASSED

+----------------------------------------------------------------------+
| IE Proxy Config for Current User |
+----------------------------------------------------------------------+

Auto Detect Settings : YES
Auto-Configuration URL :
Proxy Server List :
Proxy Bypass List :

+----------------------------------------------------------------------+
| WinHttp Default Proxy Config |
+----------------------------------------------------------------------+

Access Type : DIRECT

+----------------------------------------------------------------------+
| Ngc Prerequisite Check |
+----------------------------------------------------------------------+

IsDeviceJoined : YES
IsUserAzureAD : NO
PolicyEnabled : NO
PostLogonEnabled : YES
DeviceEligible : NO
SessionIsNotRemote : NO
CertEnrollment : none
PreReqResult : WillNotProvision

For more information, please visit https://www.microsoft.com/aadjerrors

 

I can login only with local administration account. I can not log in with my Azure AD account.

Did you give the user Virtual Machine user role? Also the rdp advanced property needs to be filled in so that the host pool knows that the session host is AAD joined.
Can you please explain this to steps?

The rdp advanced property was in the rdp setings inside the maschien?
Thank you for the blog post.
I will delete the environment again today and recreate it based on your environment.

I will then report here.
With my creation, I have created the VM with the same.

@Johan Vanneuville

 

In your blog you use two security principals (WVD HostPool and WVD Users). This are Azure AD Groups?

 

After going through the blog article, I had the problem for a few minutes. Nahc about 5 minutes the machine was available.

 

Thank you very much for your help.

 

Where I find the ""Network security: Allow PKU2U authentication requests to this computer to use online identities" " settings? 

Those groups are AAD groups indeed.
for the PKU2U:
Local on the session host:
HKLM\SYSTEM\CurrentControlSet\Control\Lsa\pku2u -> confirm AllowOnlineID is set to 1
Via GPO:
GPO path: Computer Configuration\Policies\Windows Settings\Security Settings\Local Policies\Security Options

Policy: Network security: Allow PKU2U authentication requests to this computer to use online identities

State: Enabled

@Johan Vanneuville 

 

Thanks for your help.

I can not login to the Sessionhost with my Azure Credentials.
I see the maschien in my Azure Virtual enviroment. But I can only log in with localadmin credentials. 

@Stefan Kießig Note that we noticed an issue where it can take up to 40 minutes after VMs are deployed for them to be marked as Available. We are investigating.

 

What error are you seeing when trying to connect? Definitely have a look at: https://docs.microsoft.com/azure/virtual-desktop/troubleshoot-azure-ad-connections

 

Thank you David. But there is still the login Problem. I can only login with local admin credentials but not with AAD credentials.

@Stefan Kießig What error are you seeing when connecting?