Resetting Default and Host Tenant Passwords

"I have forgotten the password for my Default tenant. How can I gain access?"

“The guy who knew the password for my organization’s Host Admin has left but didn’t tell anyone the password. How can I get in?”

And similar inquiries.

Step by step guide

  1. Identify whether user has access to the SQL database with full permissions to read/write
  2. Identify whether or not the client requires the Host Admin password, or the Default Tenant password
  3. Provide the client with one of the below queries and ask that they execute them against their Orchestrator SQL database
  4. Inform the client that executing the queries will flag the password as requiring a reset, and that they will need to change the password on the next login.

If the Default Tenant (890iop) requires resetting, execute the following query, replacing %UIPATH ORCHESTRATOR DATABASE NAME% with the name of the client's database.

UPDATE [%UIPATH ORCHESTRATOR DATABASE NAME%].dbo.users
Set password='ALWTidnzgaDN04zwfIjlx3ogbXNNer7/QbO9y3Q4LV/MLY+2TaazMLEggpO8/b7/Kg==', IsFirstLogin='1'
where UserName='admin' AND TenantId='1'

If the Host Admin (3edcVFR$) requires resetting, execute the following query, replacing %UIPATH ORCHESTRATOR DATABASE NAME% with the name of the client's database.

Update [%UIPATH ORCHESTRATOR DATABASE NAME%].dbo.users
Set Password = 'AK3FINpqU/VzL+c+VL8mbk9wH35Y22bnTnGlLcAq8KKNqj2pN+3bv0+V0qoSKLIANg==', IsFirstLogin='1'
WHERE Username='admin' and Name='System' and Surname='Administrator'



From 2020.4.1
Identity related data has been moved to new schema "identity". Hence, use below SQL to reset the password of admin user under Default tenant to 890iop

UPDATE [%UIPATH ORCHESTRATOR DATABASE NAME%].[identity].[AspNetUsers]
Set PasswordHash='ALWTidnzgaDN04zwfIjlx3ogbXNNer7/QbO9y3Q4LV/MLY+2TaazMLEggpO8/b7/Kg==',
IsFirstLogin = 1
where Email = 'admin@defaulttenant.com'


Use below SQL to reset the password of admin user under host tenant to 3edcVFR$
UPDATE [%UIPATH ORCHESTRATOR DATABASE NAME%].[identity].[AspNetUsers]
Set PasswordHash='AK3FINpqU/VzL+c+VL8mbk9wH35Y22bnTnGlLcAq8KKNqj2pN+3bv0+V0qoSKLIANg==',
IsFirstLogin = 1
where
Id = (SELECT anu.Id
FROM [%UIPATH ORCHESTRATOR DATABASE NAME%].[identity].[AspNetUsers] anu
join [%UIPATH ORCHESTRATOR DATABASE NAME%].[identity].[Partitions] p on p.Id = anu.MasterPartitionId
join [%UIPATH ORCHESTRATOR DATABASE NAME%].[identity].[Tenants] t on t.PartitionId = p.Id
where UserName = 'admin'
and t.Name = 'host'
)


Note:

This approach is not recommended since any wrong changes in the database would pull the entire orchestrator website down. Please make sure that you are giving the correct hash value and in correct field.

Also, this approach may work or may not as HASH key value depends on the encryption & decryption key.