AD integration using spoke User Creation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2024 09:33 PM
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 :
Any help would be appreciated . Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2024 10:12 PM
@C_S3 It looks like you're facing an issue in your Active Directory (AD) integration with ServiceNow using the Spoke. The error message indicates that the system is trying to create a user with an invalid username (e.g., lundefined), which suggests that there may be an issue with how the username is being generated.
Ensure that firstName and lastName are both properly populated and not undefined when the script is executed. If either value is missing, the username will end up invalid (like lundefined).
Hope this will help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2024 09:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2024 06:08 PM - edited 11-12-2024 06:09 PM
@C_S3 The issue seems to be with the generated username value, specifically lsingh. It looks like the first initial (l) was formed incorrectly, possibly from an undefined or incorrect variable. The script may be using an unintended value or handling input data improperly.
Input Validation: Ensures that firstName and lastName are not undefined or empty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2024 10:53 PM
Hello @Abhay Kumar1 ,
Generated username value is correct, (New User should be created with first intial, last name
e.g. for Jia Singh
jsingh) . Still we are getting error message while trying to look up in flow