Help to check if the user is member of AD group even before using "Add user to a Group" activity?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2020 02:59 PM
Does anyone know of the best way we can perform a pre check to see if the user is apart of a AD group prior to running the Add user to a Group" activity?
We have a workflow that is adding users to AD groups, however, if the user is already apart of the AD group the workflow activity fails. We would like to do a pre check and see if the user is already apart of the AD group to bypass the 'add user to a group' activity. I have looked into using the query AD activity but not sure of the exact configuration.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2020 07:49 PM
Hi,
I believe you must be using AD orchestration pack here;
you can use query AD activity with the samaccountname
then in the response of this activity parse the response and check if the group is present
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2020 07:55 PM
Hi Ankur,
Could you provide some further detail on this, any hits on the query AD activity syntax and how to parse the results is what I am looking for.
Thanks,
Alistair
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 11:58 AM
If you still need help with this let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2023 04:48 AM
I am trying something similiar, would you mind sharing how you got this working?