Entra IDDeep dive

Active Directory domain join errors: NetSetup.log codes and messages with fixes

Domain join failures decoded: NetSetup.log codes 0xaac, 0x8b0, 0x216d, 0x54b, 0x569, 0x6bf, 0x6d9, 0x40 and the DNS, network and logon messages, with cause and first check.

A failed domain join shows one short message in the dialog, but the real story is in NetSetup.log: the step that failed and a hex status code. This quick reference lists the codes and messages Microsoft documents for joins (DNS and DC locator, network and RPC, accounts, rights and quotas), with the usual cause and the first check for each, plus the tests that prove the join is healthy afterward.

Codes in this quick reference

  • 0xaac: An account with the same name exists in Active Directory. Re-using the account was blocked by security policy.Join dialog / NetSetup.log
  • Can't join this domain. Contact your IT admin for more info.Settings > Accounts > Access work or school
  • 0x8b0 NERR_UserExists: The account already exists.NetSetup.log
  • 0x216d: You have exceeded the maximum number of computer accounts you are allowed to create in this domain.Join dialog / NetSetup.log
  • 0x569: Logon failure: the user has not been granted the requested logon type at this computerJoin dialog / NetSetup.log
  • 0x52e: Logon failure: unknown user name or bad passwordJoin dialog / NetSetup.log
  • 0x574: Logon failure: The target account name is incorrectJoin dialog / NetSetup.log
  • 0x534: No mapping between account names and security IDs was doneNetSetup.log

+ 20 more codes in the tables below.

How this guide is organized: How to read these codes → DNS and DC locator errors → Network, SMB and RPC errors → Account, rights and quota errors → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. DNS and DC locator errors. 3. Network, SMB and RPC errors. 4. Account, rights and quota errors. 5. How to verify a fix. Toolbox: 0x0000232A, 0xC002001C, 0x0000232B, NetSetup.log, nltest /dsgetdc.1How to readthese codes2DNS and DClocator errors3Network, SMBand RPC errors4Account, rightsand quota err…5How to verify afixTOOLBOX0x0000232A0xC002001C0x0000232BNetSetup.lognltest /dsgetdcHow this guide is organized: How to read these codes → DNS and DC locator errors → Network, SMB and RPC errors → Account, rights and quota errors → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. DNS and DC locator errors. 3. Network, SMB and RPC errors. 4. Account, rights and quota errors. 5. How to verify a fix. Toolbox: 0x0000232A, 0xC002001C, 0x0000232B, NetSetup.log, nltest /dsgetdc.1How to read these codes2DNS and DC locator errors3Network, SMB and RPC errors4Account, rights and quota errors5How to verify a fixTOOLBOX0x0000232A0xC002001C0x0000232BNetSetup.lognltest /dsgetdc
At a glance: how this guide is organized · 5 sections · 5 key settings and tools

How to read these codes#

Reading NetSetup.log to find which join step failedWhat does the last NetpDoDomainJoin: status line show? if 0x0: The join succeeded (After the restart, confirm the secure channel and the object's OU); if Another value: Which step does the first line with that code name? if DC discovery: The client can't find a DC (Point it at AD DNS, join with the DNS name, run nltest /dsgetdc); if LDAP or SAM call: Creating the computer account failed (Rights, quotas or an existing account; for 0xaac, check who created it); if SMB session: The SMB session to the DC failed (Test TCP 445 and the other join ports from the client to the DC)What does the lastNetpDoDomainJoin: status lineshow?OKThe join succeededAfter the restart, confirmthe secure channel and theobject's OU0x0Which step does the first linewith that code name?FIXThe client can't find aDCPoint it at AD DNS, join withthe DNS name, run nltest/dsgetdcDC discoveryFIXCreating the computeraccount failedRights, quotas or anexisting account; for 0xaac,check who created itLDAP or SAM callFIXThe SMB session to theDC failedTest TCP 445 and the otherjoin ports from the client tothe DCSMB sessionAnother valueReading NetSetup.log to find which join step failedWhat does the last NetpDoDomainJoin: status line show? if 0x0: The join succeeded (After the restart, confirm the secure channel and the object's OU); if Another value: Which step does the first line with that code name? if DC discovery: The client can't find a DC (Point it at AD DNS, join with the DNS name, run nltest /dsgetdc); if LDAP or SAM call: Creating the computer account failed (Rights, quotas or an existing account; for 0xaac, check who created it); if SMB session: The SMB session to the DC failed (Test TCP 445 and the other join ports from the client to the DC)What does the last NetpDoDomainJoin: statusline show?0x0OKThe join succeededAfter the restart, confirm the secure channel and theobject's OUAnother valueWhich step does the first line with thatcode name?DC discoveryFIXThe client can't find a DCPoint it at AD DNS, join with the DNS name, runnltest /dsgetdcLDAP or SAM callFIXCreating the computer account failedRights, quotas or an existing account; for 0xaac,check who created itSMB sessionFIXThe SMB session to the DC failedTest TCP 445 and the other join ports from theclient to the DC
Figure 1 · Decision tree Reading NetSetup.log to find which join step failed. Read NetSetup.log from the bottom and decode the status with certutil -error; the first line with the same code names the step that failed.
  • The dialog: System Properties shows The following error occurred attempting to join the domain "contoso.com": followed by the message. Settings › Accounts › Access work or school may only say Can't join this domain. Contact your IT admin for more info., so always open the log.
  • The log: %windir%\debug\NetSetup.log on the client, written by default. Read from the bottom: NetpDoDomainJoin: status: 0x0 means success; any other value is the failure. Decode a value with certutil -error 0x54b or net helpmsg 1355 (the decimal value).
  • Read up from the status line to the first line that mentions the same code. That line names the step: DC discovery, the LDAP or SAM call that creates the computer account, or the SMB session to the DC.
Text
NetpManageMachineAccountWithSid: The computer account already exists in Active Directory.Re-using the account was blocked by security policy.
NetpProvisionComputerAccount: retry status of creating account: 0xaac
NetpJoinDomainOnDs: Function exits with status of: 0xaac
NetpDoDomainJoin: status: 0xaac

A join needs DNS (TCP/UDP 53), Kerberos (TCP 88), the RPC endpoint mapper (TCP 135), LDAP and the DC locator (TCP/UDP 389), SMB (TCP 445) and dynamic RPC (TCP 1024-65535) from the client to the DC. Start every investigation with these:

PowerShell
# Last status lines of the failed attempt
Select-String -Path "$env:windir\debug\NetSetup.log" -Pattern 'NetpDoDomainJoin: status|Function exits with status|failed' |
  Select-Object -Last 15
# Can this client find a DC? Use the DNS name of the domain, not the NetBIOS name
nltest /dsgetdc:contoso.com /force
Resolve-DnsName -Type SRV _ldap._tcp.dc._msdcs.contoso.com
# TCP reachability of the DC that answered
foreach ($p in 53, 88, 135, 389, 445) { '{0,-4} {1}' -f $p, (Test-NetConnection dc01.contoso.com -Port $p -InformationLevel Quiet) }

Joins during a task sequence, Autopilot hybrid join or Cloud PC provisioning run into many of the same causes; see the task sequence error codes, the Autopilot hybrid join article and Cloud PC provisioning failures for their extra steps.

DNS and DC locator errors#

Code / messageMeaningUsual causeFirst check
0xa8b: An attempt to resolve the DNS name of a DC in the domain being joined has failed. Please verify this client is configured to reach a DNS server that can resolve DNS names in the target domainThe client can't find a DC through DNS.A workgroup machine using a DNS server that doesn't host or forward the AD zone, or the NetBIOS name typed instead of the DNS name.Point the preferred DNS at AD DNS; join with contoso.com; run nltest /dsgetdc.
0x0000232B RCODE_NAME_ERROR: DNS name does not exist.The DNS server answered, but the DC locator SRV record isn't there.Wrong DNS server, or missing records under _msdcs.Query the SRV record; on DCs, restarting Netlogon re-registers missing SRV records.
0x0000232AThe DNS name can't be resolved.The DNS server couldn't answer for the domain.Query the same record against each configured DNS server with Resolve-DnsName -Server.
0x54b: The specified domain either does not exist or could not be contacted.DC discovery failed.DNS problems, or blocked UDP/TCP 389 or 53.nltest /dsgetdc:contoso.com /force and the port test above.
0x3a: The specified server cannot perform the requested operationThe LDAP part of the join fails.No reliable TCP 389 connectivity between the client and the DC.Test-NetConnection on 389; firewall and IPS logs.

The classic dialog for a DNS failure is An Active Directory Domain Controller (AD DC) for the domain "contoso.com" could not be contacted. Its Details show the record and the code:

Text
The following error occurred when DNS was queried for the service location (SRV) resource record used to locate an Active Directory Domain Controller (AD DC) for domain "contoso.com":
The error was: "DNS name does not exist."
(error code 0x0000232B RCODE_NAME_ERROR)
The query was for the SRV record for _ldap._tcp.dc._msdcs.contoso.com

Network, SMB and RPC errors#

Code / messageMeaningUsual causeFirst check
0x6bf or 0xc002001c: The remote procedure call failed and did not executeAn RPC call to the DC was cut off.A router, firewall or VPN device rejects packets between the client and the DC.TCP 135 and the dynamic RPC range; current NIC driver; turn off TCP Chimney Offload and IP offloading to test.
0x6d9: There are no more endpoints available from the endpoint mapperThe RPC endpoint can't be reached.Connectivity between the client and the DC is blocked.TCP 135 plus TCP 1024-65535 to the DC.
0x40 (ERROR_NETNAME_DELETED): The specified network name is no longer available.The SMB session to the DC dropped; the log shows NetUseAdd to \\dc1.adatum.com\IPC$ returned 64.The Kerberos reply for the SMB session never arrives: a WAN accelerator acknowledges the request, or a firewall drops the KDC reply.Reproduce with net use to the same \\dc\IPC$ path under a network trace; replies with an IP TTL of 64 or lower hint at a Linux-based accelerator.
Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed.A session to the DC already exists under other credentials.Mapped drives or latent connections.Restart, then join with the DNS domain name.
An operation was attempted on a nonexistent network connectionA stale connection.NetBIOS name used, or leftover sessions.Restart and use the DNS name.
Network name cannot be foundThe name can't be found on the network.DNS that doesn't serve the AD zone; old NIC driver.nltest /dsgetdc; update the NIC driver.
No more connections can be made to this remote computer at this time because there are already as many connections as the computer can acceptThe DC refused another session.Mapped connections on the client, or a busy DC; can be transient.Clear mapped drives, restart, retry; then check the DC.
The format of the specified network name is invalidName or network-stack problem.DNS, outdated NIC drivers or blocked ports.DNS and ports as above; turn off TCP Chimney Offload and IP offloading to test.

Account, rights and quota errors#

Code / messageMeaningUsual causeFirst check
0xaac (NERR_AccountReuseBlockedByPolicy): An account with the same name exists in Active Directory. Re-using the account was blocked by security policy.Reuse of an existing computer object was refused.Join hardening in updates from October 11, 2022 (CVE-2022-38042). Reuse is allowed only if the joining user created the object, a member of Domain Admins, Enterprise Admins or built-in Administrators created it, or its owner is trusted in Domain controller: Allow computer account reuse during domain join (needs updates from March 14, 2023 on members and DCs).Who owns and created the object (command below). Join as that account, trust the owner in the policy, or delete the stale object and join again.
0x8b0 (NERR_UserExists): The account already exists.A computer object with that name exists.Same situation as 0xaac.Same checks as 0xaac.
0x216d: Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased.The DC refused to create another computer object for this user; the log shows NetpProvisionComputerAccount: LDAP creation failed: 0x216d.A non-admin passed the default limit of 10 joins, or a GPO restricts Add workstations to domain.The quota (command below) and User Rights Assignment › Add workstations to domain in the Default Domain Controllers Policy. Better: pre-create objects or delegate Create Computer objects on the OU to a join account.
0x569: Logon failure: the user has not been granted the requested logon type at this computerA user right is missing.The join account lacks Access this computer from the network on the DC handling the join.User rights in the GPO applied to DCs (gpresult /h on the DC).
0x52e: Logon failure: unknown user name or bad passwordWrong credentials.A typo, a wrong password, or an account that doesn't exist.Enter the account as CONTOSO\user or a UPN.
0x574: Logon failure: The target account name is incorrectThe Kerberos target name doesn't match the DC that answered.DC DNS records with wrong IP addresses, or bad SPN registrations.The DC's A records; duplicate SPNs with setspn -X.
0x534: No mapping between account names and security IDs was doneA name lookup returned nothing.Usually transient: logged while the join checks whether the computer object exists.Only a problem if it's the final status; read further down the log.
0x5: Access is denied.The join account can't write the object.No create rights on the target OU, or no rights on a pre-created object.Delegation on the OU; the pre-created object's owner.
0x576: There is a time and/or date difference between the client and server.Kerberos rejects the clock difference.The client's clock is far from the DC's.w32tm /stripchart /computer:dc01.contoso.com /samples:3 /dataonly.
Not enough storage is available to complete this operationThe Kerberos token is too big.The join account is in many groups.Raise the Kerberos maximum token size on the client, or use a join account with fewer groups.
The account is not authorized to login from this stationSMB session setup refused.SMB signing settings differ between the client and the DC.Compare the SMB signing policies on both sides.
The account specified for this service is different from the account specified for other services running in the same processA service problem on the DC side.The Windows Time service isn't running on the DC used for the join.Start W32Time on that DC.
The directory service has exhausted the pool of relative identifiersThe DC can't issue a SID for the new object.The RID master is offline or replication is broken.netdom query fsmo; repadmin /replsummary /bysrc /bydest /sort:delta.
PowerShell
# 0xaac / 0x8b0: who owns and who created the existing object
$pc = Get-ADComputer PC01 -Properties nTSecurityDescriptor, 'mS-DS-CreatorSID', whenCreated
$pc.nTSecurityDescriptor.Owner
$pc.'mS-DS-CreatorSID'      # filled in when a non-admin created it through the join quota
# 0x216d: the domain's machine account quota (10 by default)
Get-ADObject (Get-ADDomain).DistinguishedName -Properties 'ms-DS-MachineAccountQuota' |
  Select-Object 'ms-DS-MachineAccountQuota'
# Join from Windows PowerShell 5.1 with an explicit OU
Add-Computer -DomainName contoso.com -OUPath 'OU=Workstations,DC=contoso,DC=com' -Credential (Get-Credential CONTOSO\svc-join) -Restart

Watch out: Don't delete an existing computer object just to get past 0xaac until you've confirmed it's stale. Deleting the object of a working machine breaks that machine's trust with the domain.

How to verify a fix#

  1. The last lines of NetSetup.log show NetpJoinDomainOnDs: Function exits with status of: 0x0 and NetpDoDomainJoin: status: 0x0.
  2. After the restart, Test-ComputerSecureChannel returns True and nltest /sc_verify:contoso.com reports NERR_Success for both the connection and the trust verification.
  3. Get-ADComputer PC01 -Properties whenCreated shows the object in the intended OU, and gpresult /r lists computer policies from the domain.
  4. For hybrid-joined devices, continue with dsregcmd /status. If DC discovery keeps failing, the DC-side events are in the AD DS, Netlogon and DNS events reference, and replication problems behind RID errors in the replication errors reference.

Tip: For a log bundle Microsoft support can read, Microsoft's Auth Scripts (start-auth.ps1, reproduce, stop-auth.ps1) and the TSS tool (TSS.ps1 -scenario ADS_AUTH) capture NetSetup.log and a network trace together.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

Intune Subject Matter Expert in Cairo, Egypt, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)