function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sai Bhaskar 16Sai Bhaskar 16 

How to reset bulk password for all the active users in a full sandbox

Suraj Tripathi 47Suraj Tripathi 47
Sai Bhaskar 16,

List<User> userList = new List<User>(); 
userList = [SELECT Id from User WHERE username like 'Test.User%' and isActive = TRUE]; 
for (User u : userList) 

System.setPassword(u.Id, '***********'); 
}

Please refer also below link -

https://help.salesforce.com/s/articleView?id=000322720&type=1

I hope you find the above solution helpful. If it does, please mark it as the Best Answer to help others too.

Thanks and Regards,
Suraj Tripathi