Share via

not able to connect to vm with 365 credentialsTried to do a "dsregcmd /join" to revert but it kicks back and error

Sunshine Admin 60 Reputation points
2026-02-19T19:13:31.96+00:00

I was trouble shooting an issue with my terminal server and copilot had me do a "dsregcmd /leave", and now my users can't login with thier 365 credemtails anymore. Tried to do a "dsregcmd /join" to revert but it kicks back and error

C:\Users\DBadmin>dsregcmd /join /debug

DsrCLI: logging initialized.

DsrCLI: logging initialized.

DsrCmdJoinHelper::Join: ClientRequestId: 83f

PreJoinChecks Complete.

preCheckResult: DoNotJoin

deviceKeysHealthy: undefined

isJoined: undefined

isDcAvailable: NO

isSystem: YES

keyProvider: undefined

keyContainer: undefined

dsrInstance: undefined

elapsedSeconds: 0

resultCode: 0x1

The device can NOT be joined because a domain controller could not be located.

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
{count} votes

Answer accepted by question author
  1. VEMULA SRISAI 9,820 Reputation points Microsoft External Staff Moderator
    2026-02-20T16:51:33.7466667+00:00

    Sunshine Admin Since the AADLoginForWindows extension was already reinstalled, Entra ID login is enabled, and RBAC roles are assigned, the remaining cause of the “Your credentials did not work” error is a broken Microsoft Entra ID device trust created after running dsregcmd /leave.

    The fix is to delete the VM’s device object from Microsoft Entra ID, remove and reinstall the AADLoginForWindows extension, and allow the VM to re‑register. After re‑registration (DeviceAuthStatus: SUCCESS), Entra ID sign‑in works again.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.