Can't Impersonate Users

John Fallara
Giga Contributor

Still pretty new to ServiceNow, and our implementation is just getting off the ground. Completed the SN Fundamentals course and am trying to learn more in my own Dev instance (Madrid). Right out of the gate though I'm running into an issue. I can't impersonate users.

I'm logged in as Admin. When I pull up the Impersonate option, anyone I try to search for to impersonate returns "No Matches Found." I already did some digging around in the forums here, and have tried modifying the READ ACL for sys_user.locked_out as detailed here with no luck. Any ideas?

 

EDIT: Yes, I am logged in as Admin. I did quite a bit of Impersonating during training, so I know how the process works. Yes, the user(s) I'm trying to impersonate are in the system. The problem I get is that when the Impersonate box pops up, and I enter a name to search for, it returns "No Matches Found." It doesn't matter who I search for. Nothing returns.

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

John Fallara
Giga Contributor

I figured it out. All of the users in the demo dataset were "Locked Out" and thus couldn't login or be impersonated.

While I'm happy I got it sorted, I'm really confused as to why they would all be Locked Out in a brand new dev instance that I just spun up. It wasn't anything I changed. It's largely academic now, but if anyone knows why all the users would have been Locked Out, I'd be interested to know. Thanks everyone who tried to help with this! I appreciate it!

View solution in original post

20 REPLIES 20

Hi Thanks, to let us know about the reasons. BR Dirk

Aurin
Kilo Contributor

How do you Unlock users ??

You have to make sure the Active checkbox is set to true and Locked out checkbox to false on the user record.

find_real_file.png

Please mark my response as correct answer and helpful if it helped solved your question.
-Best Regards
Prateek kumar

 

 


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

Thanks for your reply Prateek. That does help but I want to unlock all users in one shot. All users in my dev instance got automatically Locked Out. No idea how or why that happened. I can go into each account and unlock it. But that would take me a few hours. Is there any way to unlock all accounts in one shot ?

Thanks!

 

Here is the script that will unlock all the users in one go.

Navigate to System Definition> scripts-background and run below script

var tab = new GlideRecord('sys_user');
tab.query();
while(tab.next()){
tab.active =true;
tab.locked_out = false;
tab.setWorkflow(false); //helps in prevent running of BR's while updating
tab.autoSysFields(false);
tab.update();
}

Please mark my response as correct answer and helpful if it helped solved your question.
-Best Regards
Prateek kumar


Please mark my response as correct and helpful if it helped solved your question.
-Thanks