The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Password Reset Module with Active Directory - Invalid User Name

DylanB
Tera Guru

Hello, we are in the process of setting up the Password Reset module to allow the Service Desk to reset users' Active Directory passwords.

 

When running the Service Desk password reset process that has been set up, it returns a general error message. In checking the Flow executions, I discovered that it's failing because of an "Invalid User Name" error message. The username that it's pulling in contains the domain information, for example, it's pulling in jkirk@servicenow.net. The username it needs to be pulling in is just jkirk without the domain information.

 

I tested manually changing the ServiceNow User ID for JKirk and that allows the password reset to go through successfully, but this User ID information is synced directly from Active Directory, so changing that User ID field is not a permanent solution. 

 

I saw we can also change the Flow that the password reset process uses but I'm not sure this is the best solution. Has anyone else come across this issue? What's the best course of action here?

7 REPLIES 7

Sandeep Rajput
Tera Patron
Tera Patron

@DylanB Inside your flow, after your Look up record step, you need to apply Transform function on your User ID field. You need to apply two transform function

1) Split: Break the user id string using @

2)Get Item from Array: Split returns an array and your user id(JKirk) will be at 0th index.

Screenshot 2023-11-03 at 11.09.24 PM.png

For more information on Transform function please refer to https://docs.servicenow.com/bundle/sandiego-application-development/page/administer/flow-designer/co....

 

Hope this helps.

 

 

Hi Sandeep, the transform does work to remove the unneeded part of the username, but to add the transform to the username data pill, I have to create a copy of the built-in Password Reset Flows. The trouble with that is the Password Reset Master Subflow still tries to use the incorrect OOB flows for some things and doesn't complete the process correctly. 

 

For example, changing the flow used by the Password Reset to the flow with the transform logic allows the password to be reset, but then the activity log for these password resets doesn't display the information correctly, presumably because the communication between the master flow and the other flows is broken. 

DylanB_0-1699034346313.png

 

 

 

If you are not able to make changes in the OOTB flow then I suggest you to find the missing link for your copied flow. Also, see if you can make a calculated field on sys_user table to just extract the username from the entire string and use this calculated field as an input to the OOTB flow.

indrajeetma
Tera Guru

@DylanB Did Your problem got resolved? I am facing same problem too.
Thanks