Need Assitance for creating users in Active Directory from servicenow using Microsoft Active Directo

sharukh
Tera Contributor

Iam able to create a user in Active Directory from servicenow using flow designer and create user action in Microsoft Active Directory spoke v2.But the issue how can we create the users if the user is having same usernames.i would like to add o1, if user exists,if that user exists it has to add 02.How can we acheive this.Iam using Does user exists action for checking the user is already present in Active Directory.

1 REPLY 1

Shreya Shah
ServiceNow Employee
ServiceNow Employee

This is not directly related to Microsoft Active Directory v2 Spoke. It seems like you will need to build an abstraction layer, may be a subflow that takes in username.

 

1. Develop a subflow that takes in a username

2. Check if the user exists using Does User Exists

3. If it does, increment and check again for condition in step #2, till you get false for Does User Exists, break the loop

4. Create the user with finally the increment number where the loop breaks.