Skip to main content

Rename user

Change the object name of a user (optionally also its display name), its sign-in name (sAMAccountName and the part of the UPN before @), or both.

Command in the Active Directory toolkit · id ooa.active_directory/rename_user · 6 inputs (2 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
UsernameStringYesLogon name (sAMAccountName or UPN), full name, or distinguished name.
New nameStringYesNew object name (common name), e.g. Jane Doe; also the new sign-in name when only the sign-in name is renamed and new_sign_in_name is empty.
Update display nameBooleanNotrueAlso set the display name to the new name (when the object name changes).
SessionStringNoadSession name.
Rename targetStringNoobjectobject: the object name only (the sign-in name is kept); sign_in: the sign-in name only; both: object name and sign-in name.
New sign in nameStringNoNew sign-in name (sAMAccountName, up to 20 characters); new_name is used when empty.

Outputs​

OutputTypeWhat it is
dnStringNew distinguished name.