Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows » An account with the same name exists in Active Directory: Re-using the account was blocked by a security policy
  • AADSTS50020  User from Identity Provider does not exist in Tenant
    AADSTS50020: User from Identity Provider does not exist in Tenant AWS/Azure/OpenShift
  • how to bypass windows admin log in password 2
    Disable or Enable Auto log on in Windows Windows
  • screenshot 2020 02 09 at 21.47.28
    How to find Computer Model and Serial Number Windows
  • banner 1
    How to Hide or Block Wi-Fi Networks on Windows Network | Monitoring
  • Change default postgreSQL database password
    How to change the default user password in PostgreSQL Oracle/MSSQL/MySQL
  • Screenshot 2022 04 02 at 22.17.10
    How to Install Kubectl on Windows 11 Windows
  • SQL Loves Linux 2 Twitter 002 640x358 1
    Install Microsoft SQL Server 2019 and MSSQL Command line tools on Ubuntu Linux Oracle/MSSQL/MySQL
  • Screenshot
    Fix AirDrop issue “No People found and there is no one nearby to share with” on Mac Mac

An account with the same name exists in Active Directory: Re-using the account was blocked by a security policy

Posted on 23/11/202229/08/2025 Christian By Christian 10 Comments on An account with the same name exists in Active Directory: Re-using the account was blocked by a security policy
netjoinhardening

In this article, you learn how to add an account with the same name exists in Active Directory: Re-using the account was blocked by a security policy. When attempting to add a pre-created PC to a domain or reuse an existing computer account. Please see Active Directory Ports: Service and network port requirements for Windows, How to find disabled Active Directory User accounts, What are Active Directory Forest, Trees, Domain, and Sites, and how to Setup a Domain Controller.

The following error below is encountered. An account with the same name exists in Active Directory. Re-using the account was blocked by the security policy. Windows updates released on and after October 11, 2022, thereby introducing additional protections (hardening) of your environment. This hardening mitigates the following “CVE-2022-38042 (Active Directory Domain Services Elevation of Privilege Vulnerability)”.

The NetJoinDomain function joins a computer to a workgroup or domain. Before proceeding to discuss this new behaviour, let’s discuss how it was before.

Kindly refer to some of these related guides. How to delete and restore objects using Active Directory Administrative Center, and How to Manage BitLocker and FileVault with Trellix Native Encryption

Legacy behaviour

Before the installation of the October 11, 2022 update, or later cumulative updates. The client’s computer queries Active Directory for an existing account with the same name. This query occurs during domain join and computer account provisioning. If such an account exists, the client will automatically attempt to reuse it.

Note: During this time, the reuse attempt will fail if the user who attempts the domain join operation does not have the appropriate write permissions. However, if the user has enough permissions the domain join will succeed.

There are two scenarios with respect to the default behaviours and flags. Thereby disallowing the account or provisioning or reusing the account when configured only.

Reason for this behaviour: An account with the same name exists in Active Directory, re-using the account was blocked by a security policy

Microsoft released KB5020276 last month (October 2022). This modifies the domain join process and performs additional security checks before attempting to reuse existing computer accounts. These protections intentionally prevent domain join operations from reusing an existing computer account in the target domain with these exemptions.

  • Account reuse attempts will be permitted if the user attempting the operation is the creator of the existing account.
  • Account reuse attempts will be permitted if the account was created by a member of domain administrators.

Therefore, computer account reuse is only permitted in the following scenarios above

New behaviour: An account with the same name exists in Active Directory, re-using the account was blocked by a security policy

Once you install October 11, 2022, or subsequent cumulative updates on a client computer, during domain join. The client will perform additional security checks before attempting to reuse an existing computer account.

If an account has already been pre-positioned (created) or joined to the domain previously, and you do not fall into the two criteria of account reuse. The following error below will be prompted.

domainjoinissue

These additional security checks are done before attempting to join the computer. If the checks are successful, the rest of the join operation is subject to Active Directory permissions as before. This change does not affect new accounts.

Note: Event ID 4101 will be triggered once the error above occurs and the issue will be logged in c:\windows\debug\netsetup.log. Please follow the steps below in taking Action to understand the failure and resolve the issue.

Kindly refer to these related guides: The logon attempt failed for the remote desktop connection, How to fix “An Attempt Was Made to Reference a Token That Does, and how to fix the error: An Active Directory could not be contacted or cannot find domain next existent domain.

Action Taken

Step 1: I am very okay with this hardening and will not be finding a way around it. I will simply proceed to Active Directory and have the computer account deleted. Then, I will proceed to have the device join the domain again.

Capture

Step 2: I will proceed to the device to have it joined to the domain again.

Here are some related guides. How to join a computer to the Domain, how to fix “The specified domain either does not exist or could not be contacted“, and how to fix the following error occurred attempting to rename the computer, Account already exists.

domainjoin

You will be prompted to enter your Domain Administrators Account credentials. Enter your credentials and click on OK.

JoinWin11

As shown in the image below- The device has been joined to the domain successfully. Click on Ok to complete this step.

Domainjonsuccessful

Click on Okay to restart your Computer!

domainjoindevicerestart

Please see Why does the legacy PXE not does work on Generation 2 VM, How to Reset a Cisco 3650 Catalyst Switch, What to do after increasing the Memory of an Oracle Database, how to Perform Continuous Ping in Different Environments, and How to perform a continuous ping on macOS, Linux, Windows, Juniper and Cisco devices.

Other Workarounds

Review computer account provisioning workflows and understand if changes are required.

  • Perform the join operation using the same account that created the computer account in the target domain.
  • If the existing account is stale (unused), delete it before attempting to join the domain again. This is exactly the action I took!
  • Rename the computer and join using a different account that doesn’t already exist. This is a possibility, but what if you really cannot use a different name? Then the next solution should work for you.
  • If the existing account is owned by a trusted security principal and the administrator wants to reuse the account. They might do so by temporarily setting the following registry key at the individual client computer level. Then immediately remove the registry setting after the join operation is complete. No restart is necessary for changes to the registry key to take effect.
PathHKLM\System\CurrentControlSet\Control\LSA
TypeREG_DWORD
NameNetJoinLegacyAccountReuse
Value1 “Other values are ignored”.
Note: Caution: If you choose to set this key to work around these protections. You will leave your environment vulnerable to CVE-2022-38042 unless your scenario is referenced below as appropriate. 

Do not use this method without confirmation that the Creator/Owner of the existing computer object is a secure and trusted security principal.

Temporarily set the Registry Setting for the individual Computer

To set the key, launch the Registry Editor of the specific device in question. Create the key, and modify the value above. You may have to create the key if it does not already exist. Please navigate to the Registry Path below

HKLM\System\CurrentControlSet\Control\LSA

As you can see, the DWORD Value “NetJoinLegacyAccountReuse” does not exist already. I will have to create it.

keydoesnotexist-yet
legacyregsetting

Modify the DWORD you have just created, and enter the value of 1 as discussed in the table above.

setthevalueto1

Modify the DWORD you have just created, and enter the value of 1 as discussed in the table above.

deleteafteruse

Note: In the future, Microsoft might remove support for the NetJoinLegacyAccountReuse registry setting and will have it replaced with an alternative method. When this happens, we may have to update this piece or add it to the comment session.

I hope you found this blog post helpful on Domain Join hardening: An account with the same name exists in Active Directory: Re-using the account was blocked by a security policy. Please let me know in the comment session if you have any questions.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Pocket (Opens in new window) Pocket
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Security | Vulnerability Scans and Assessment, Windows, Windows Server Tags:Active Directory, Active Directory Domain Services, An account with the same name exists in Active Directory, Microsoft Windows, Re-using the account was blocked by a security policy, Windows 10, Windows 11, Windows Server 2016, Windows Server 2019, Windows Server 2022, Windows Server 2025

Post navigation

Previous Post: Fix MBAM Client Deployment is only supported on MBAM 2.5 SP1
Next Post: Unable to find my BitLocker Recovery Key in AD

Related Posts

  • Restrict Access to USB Drives
    Deny Execute Access: Restrict Access to USB Drives on Windows [Part 1] Windows
  • Fix Secure Boot certificate expiration
    Enable Secure Boot: Fix Secure Boot certificates expiration Windows
  • UpdateOfficeOnlineServer 1
    Perform Office Online Server Update via Windows Updates Windows Server
  • uninstall installed Windows Update from Windows
    How to uninstall installed Windows Update Windows
  • Featured image   Thumbnails issue on Windows 11
    Fix File Explorer thumbnails issue on Windows 11 Windows
  • ansible business cards 1600x0 c default
    Kerberos error: Clock skew too great while getting initial credentials Windows Server

More Related Articles

Restrict Access to USB Drives Deny Execute Access: Restrict Access to USB Drives on Windows [Part 1] Windows
Fix Secure Boot certificate expiration Enable Secure Boot: Fix Secure Boot certificates expiration Windows
UpdateOfficeOnlineServer 1 Perform Office Online Server Update via Windows Updates Windows Server
uninstall installed Windows Update from Windows How to uninstall installed Windows Update Windows
Featured image   Thumbnails issue on Windows 11 Fix File Explorer thumbnails issue on Windows 11 Windows
ansible business cards 1600x0 c default Kerberos error: Clock skew too great while getting initial credentials Windows Server

Comments (10) on “An account with the same name exists in Active Directory: Re-using the account was blocked by a security policy”

  1. Avatar photo Anonymous says:
    30/12/2022 at 1:58 AM

    The Reg Key workaround worked great and I didn’t have to restart to get the value to work for “NetJoinLegacyAccountReuse”. THank you for the great article!

    Log in to Reply
    1. chris Christian says:
      03/01/2023 at 9:38 PM

      You are welcome

      Log in to Reply
  2. Avatar photo Matěj Vácha says:
    14/02/2023 at 11:55 AM

    hello. works for me too! had tough last two days 😀 thanks for good sleep

    Log in to Reply
    1. chris Christian says:
      14/02/2023 at 1:10 PM

      Awesome! I am glad you found it useful.. Cheers!

      Log in to Reply
  3. Avatar photo Mohamed Aly says:
    10/04/2023 at 12:56 PM

    Hello,
    Thank you so much for that workaround.

    Log in to Reply
    1. chris Christian says:
      10/04/2023 at 1:29 PM

      Thank you so much for your kind words.

      Log in to Reply
  4. Avatar photo Nodean Hammond says:
    14/10/2023 at 10:57 PM

    Thanks, the registry edit worked for the problem I was facing, this article is a lifesaver

    Log in to Reply
    1. chris Christian says:
      15/10/2023 at 9:31 PM

      Thank you @Nodean for your kind words I am glad you found this article useful.

      Log in to Reply
  5. Avatar photo Sami (Samuel A.E. Hock) Hock says:
    18/07/2024 at 4:13 PM

    Thank you. Using a domain administrator account credentials worked fine to rejoin the domain with the same device name.

    Log in to Reply
    1. chris Christian says:
      18/07/2024 at 6:16 PM

      Thanks a lot for the kind words. I am glad you found it useful.

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • AADSTS50020  User from Identity Provider does not exist in Tenant
    AADSTS50020: User from Identity Provider does not exist in Tenant AWS/Azure/OpenShift
  • how to bypass windows admin log in password 2
    Disable or Enable Auto log on in Windows Windows
  • screenshot 2020 02 09 at 21.47.28
    How to find Computer Model and Serial Number Windows
  • banner 1
    How to Hide or Block Wi-Fi Networks on Windows Network | Monitoring
  • Change default postgreSQL database password
    How to change the default user password in PostgreSQL Oracle/MSSQL/MySQL
  • Screenshot 2022 04 02 at 22.17.10
    How to Install Kubectl on Windows 11 Windows
  • SQL Loves Linux 2 Twitter 002 640x358 1
    Install Microsoft SQL Server 2019 and MSSQL Command line tools on Ubuntu Linux Oracle/MSSQL/MySQL
  • Screenshot
    Fix AirDrop issue “No People found and there is no one nearby to share with” on Mac Mac

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,834 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.