Need to create a flow designer to create user and assign role

Supriya13
Giga Expert

Created a catalog item with variable 

1. Company name > refernce

2. user name > string> autopuplated

3. password > mask type 

Need to create a flow designer to create a new user and assign the role to him. 

 

I start with trigger > service task , also add get catalog variable , and  stuck at action to create a user 

how can I create user and assign role to user

1 ACCEPTED SOLUTION

Hi,

you need to use inline f(x) script to unmask and then set the value for password field

Sample script below

var password = fd_data._1__get_catalog_variables.passwordVariable.getDecryptedValue();
return password;

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

17 REPLIES 17

How to do in scoped application?

for scoped app

you cannot access the getDecryptedValue() API from a scoped app.

So you need to create script include in global scope and make it accessible from all scopes and call it

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

created a  global  script include, but how pass variable of flow designer to script include ,

 

i tried but  not working.

created a  global  script include, but how pass variable of flow designer to script include ,

 

i tried but  not working.

created a  global  script include, but how pass variable of flow designer to script include ,

 

i tried but  not working.