How to import consultants from Azure AD to serviceNow using Spoke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 11:41 PM
Hi Experts,
1) We have already established the integration between Azure AD and ServiceNow using spoke.
2) We want to bring in Consultants from Azure AD to ServiceNow and need to overwrite any duplicates already in ServiceNow. Which Action we can use to achieve this?
I need a flow logic to achieve this, please advise!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 10:59 PM
Hi @Community Alums,
If your consultant records are in the same OU in AD, you can use the Query AD action to pull in the relevant objects using an LDAP query on the OU. Then use a for each loop to go over each of the objects to first check whether an account already exists in ServiceNow and if not, create the account. Just be mindful of the objects being returned by the Query AD action as it will be in string form. This will need to be converted into a JSON object so that the for each action can loop through each consultant record that is returned.