Getting AD v2 Spoke action error for "Remove User from Groups"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 03:08 PM
Hello, I'm hoping someone can help me with a cryptic error.
I have a flow that uses Microsoft Active Directory v2 Spokes to
1. Create a new user
2. Adds the user to a specific group and makes it the primary group for the new user
3. Removes the user from the default primary group
The actions for steps 1 & 3 are OOB, step 2 is a custom function that is working.
When I run the OOB action "Remove User from Groups" with a single group, it works just fine. When I use the same action in a flow, it fails with the following error, which doesn't make sense to me.
Can anyone think of why this weird error is happening?
When I run the action by itself, I enter the UserID and name of the group. This always work.
When I run the flow, I use a flow variable to pass in the UserID and typed in the group name in the "Group Name 1" field. I left the Group Names array empty, it doesn't seem to need a value - at least, it doesn't show up when testing the action. I also added a pause for 5 seconds between this action and the previous action to make sure AD is finished with the previous step - it still fails.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 03:20 PM
Hello @gjz ,
Is it possible for you to share the screenshots of flow and the remove user action configuration in the flow?
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 03:35 PM
I stumbled on the answer - it's because AD hadn't caught up with the Flow. I added a 2 minute wait (5 seconds wasn't enough) between Setting the primary group and removing the default primary group - now it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 03:37 PM
Great @gjz .
Enjoy exploring the depths of ServiceNow flow designer and building miracles.
Anvesh