We cannot join a azure vm to on-prem AD.

Stig Paulsen 0 Reputation points
2025-10-14T14:46:01.9+00:00

We are unable to join Azure Virtual Desktop session hosts to Our on-prem Active Directory domain domainname.

We have followed this article: https://4sysops.com/archives/join-an-azure-vm-to-an-on-prem-active-directory/

We can't see any traffic beeing blocked in the firewalls

We get the following error: 10/14/2025 12:24:42:918 NetpValidateName: checking to see if 'domainname' is valid as type 3 name 10/14/2025 12:24:42:991 NetpCheckDomainNameIsValid [ Exists ] for 'domainname' returned 0x0 10/14/2025 12:24:42:991 NetpValidateName: name 'domainname' is valid for type 3 10/14/2025 12:24:42:991 NetpDsGetDcName: trying to find DC in domain 'domainname', flags: 0x40001010 10/14/2025 12:24:43:885 NetpDsGetDcName: failed to find a DC having account 'vm-avd01$': 0x525, last error is 0x0 10/14/2025 12:24:43:896 NetpDsGetDcName: status of verifying DNS A record name resolution for 'domaincontroller.domainname': 0x0 10/14/2025 12:24:43:896 NetpDsGetDcName: found DC '\domaincontroller.domainname' in the specified domain 10/14/2025 12:24:43:896 NetpJoinDomainOnDs: NetpDsGetDcName returned: 0x0 10/14/2025 12:24:43:896 NetpDisableIDNEncoding: using FQDN domainname from dcinfo 10/14/2025 12:24:43:900 NetpDisableIDNEncoding: DnsDisableIdnEncoding(UNTILREBOOT) on 'domainname' succeeded 10/14/2025 12:24:43:900 NetpJoinDomainOnDs: NetpDisableIDNEncoding returned: 0x0 10/14/2025 12:25:02:850 NetUseAdd to \domaincontroller.domainname\IPC$ returned 64 10/14/2025 12:25:02:850 NetpJoinDomainOnDs: status of connecting to dc '\domaincontroller.domainname': 0x40 10/14/2025 12:25:02:850 NetpJoinDomainOnDs: Function exits with status of: 0x40 10/14/2025 12:25:02:852 NetpResetIDNEncoding: DnsDisableIdnEncoding(RESETALL) on 'domainname' returned 0x0 10/14/2025 12:25:02:852 NetpJoinDomainOnDs: NetpResetIDNEncoding on 'domainname': 0x0 10/14/2025 12:25:02:852 NetpDoDomainJoin: status: 0x40

Microsoft Security | Microsoft Entra | Microsoft Entra ID
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.