Solving the Salesforce Password Reset Problem

By

It should come as no surprise that resetting a user’s password is the least glamorous part of any Salesforce Admin’s job. Yes, there is the reset password link right beside the login button. But to many users it’s invisible. But what do you do if a user never got the initial email with a temporary password after you set up the license? What if the user swears they never got any of the  Salesforce Password reset emails? Or what if it was an executive that missed the email and now needs to login? Wouldn’t it be great if Admins could just set a one-time use password?! Wouldn’t it be great to say- “I’m going to set your password to this and you can use it once to log in.”

I want you to pause for a second and click here to vote up the idea “Allow Admins to create 1-time use passwords“. Don’t vote it up because it’s my idea, that’s not why I’m linking to it. Vote it up because this ability is needed.

Until the day comes when that idea gets implemented we have to come up with a work-around.

Setting a Salesforce Users Password

Ok, before you get too far I want to warn you- there is code involved! Gasp. I know, I know, I’m a verklempt as well. Talk amongst yourselves. But it’s not that bad. So here is how we do it.

1. Log in. Click on your Your Name | Developer Console

Developer Console

2. The Developer Console will open, and look like the screenshot below. There is a lot going on here, but we only care about Execute area at the top.

Developer Console

3. Click in the “Click here to enter Apex Code” and the following pop-up will open.

Enter Apex Code Here

4. Enter the following code, replacing USER ID with the user’s id and NEW PASSWORD with the actual text you want to change it to –

System.setPassword(‘USER ID’,’NEW PASSWORD’);

Salesforce Password Reset

5. Click Execute.

Now, this isn’t the best solution. In fact, I contemplated even blogging about this solution because and Admin really shouldn’t know a user’s password. What this solution doesn’t do is force the user to reset their password once they log in- which I have issues with. But sometimes you  need to set a user’s password and move on with your day. When I posted this idea to the IdeaExchange I was also told you can do this in Workbench as well, for anyone familiar with Workbench I’d love to have you write a Guest Post.

Key Take-Away

While it’s possible to develop tips and tricks to solve our problems in the short term, when others share those problems we need to post an idea to the IdeaExchange and vote for it. Pushing ideas on the IdeaExchange is a great way for you to get involved in the future of Salesforce.

How to Display Revision History in Chatter

Have you ever needed to implement something in Salesforce that didn’t have a button click solution? I recently helped out some of our #AwesomeAdmins at Salesforce so that a Chatter feature I worked on could be enabled internally. If it helped out admins at Salesforce, maybe it’ll help you too. So let’s walk through it! […]

READ MORE

How to Create an Admin Page Layout

In case you haven’t noticed, but Salesforce Admins are special. As a Salesforce Admin you have to be special because you are the first one called on if there is a problem. Let’s take a simple problem, but one I run into more often than not- like data being populated in a field and troubleshooting […]

READ MORE
how-to-deal-with-the-salesforce-insufficient-privileges-error

How to Deal with the Salesforce Insufficient Privileges Error

Editor’s note: This is a popular blog post, so we’ve updated it with the latest information and resources on September 8, 2020. In my experience, the email or phone call starts out something like this: “I clicked on this [insert link, account, etc. here] and I’m getting an ‘Insufficient Privileges’ error… I know I should […]

READ MORE