Everytime trying to login to VM RDP it always gives user is locked

Fleet Admin 0 Reputation points
2025-04-24T18:05:06.5933333+00:00

Hello

Everytime we try to connect to VM RDP connection it always says user is locked and contact system administrator or support,

I tried by reset password as well it worked and i was successfully able to connect to RDP, but as soon as RDP i close and next time try to reconnect it gives above error user is locked

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,058 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 60,336 Reputation points
    2025-04-24T18:13:30.3233333+00:00

    As for the actual locked account it sounds like the account is getting locked out. You would need to unlock it using the User Management tools (depending on whether you're using a domain or local account).

    In my experience this is caused by someone using a stale password. These days most people have multiple devices connected to their account and if an app is using a stale password and trying to authenticate it can quickly lock out the account. The easiest way to diagnose this is to look at the audit logs on the domain controller (for domain accounts) or target machine (for local accounts).

    Before trying to remote into the machine ensure the account is unlocked. Then remote in but do not use the cached credentials for the remote connection. After you successfully remote in then close the connection. Check the lock status of the account again. If it is already locked then it is possible something on the machine you're remoting into is using the stale password for the user account (e.g. scheduled task, Windows service, etc). Again, the audit logs can help here.

    If it works correctly when you don't rely on the cached RD connection password then the cached password is probably bad. Connection using an explicit UN/PWD and set the option to save the credentials, if desired. Then try closing the session and opening it again.

    Pay careful attention to any other devices that might be using the same account. This could include phones tied to Outlook or Office apps, backend processes that use the user account (if any), etc.

    Also be very careful about expired passwords. With modern RDP security settings, once a password expires you cannot remote in until someone resets the password. I've also seen issues when someone sets the password to "change on login" in some cases.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.