Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

AD integration using spoke User Creation

C_S3
Tera Contributor

Hello All, 
We are doing AD integration using spoke and we have to achieve below functionality  : 

New User should be created with first intial, last name
e.g. for Jia Singh
jsingh

if this fails because username already exists, we should try first two letters of first name, last name
jisingh 

When I'm trying to look up the user I'm getting below error :

{
    "Action Status": {
        "code": 1,
        "message": "Error:  Invalid User Name : lundefined (Process Automation.082703af87f055107701ed3e0ebb35d4; line 35)"
    }
}

 Script which I'm using for look up : 

C_S3_0-1731216703760.png

 

Any help would be appreciated . Thank you!

5 REPLIES 5

Mahmoud Rashwan
Tera Contributor

I have the same issue , tried all the possible combination of user names @C_S3 , did you find out the solution for this?