Resetting Default And Host Tenant Passwords

How to gain access to the Default Tenant when password is forgotten?

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.

Scenario 1: Before 2020.4.1

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'



Scenario 2: From 2020.4.1 till 2021.4

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'
)


From 2021.10.1

  1. Backup

SELECT *
INTO [Uipath].[identity].[AspNetUsers_backup]
FROM [Uipath].[identity].[AspNetUsers]

  1. Use below SQL to reset the password of admin user under host tenant to 3edcVFR$

UPDATE [Uipath].[identity].[AspNetUsers]
Set PasswordHash='AK3FINpqU/VzL+c+VL8mbk9wH35Y22bnTnGlLcAq8KKNqj2pN+3bv0+V0qoSKLIANg==',
IsFirstLogin = 1
where
Id = (SELECT anu.Id
FROM [Uipath].[identity].[AspNetUsers] anu
join [Uipath].[identity].[Partitions] p on p.Id = anu.MasterPartitionId
where UserName = 'admin'
and p.Name = 'host'
)

Note: This approach is not recommended since any wrong changes in the database would pull the entire Orchestrator website down. Make sure that the correct hash value is given and in correct field.

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

1 Like

A post was split to a new topic: V2021.10.1 onwards , How to reset the default tenant’s admin password?

Hi,

Application wise change password option is available. Can you please use that way.

If you have any doubt pls let me know

Thanks,
Raja Ramaiyan