Creating a Microsoft Exchange Online Path in the Workflow
Configure the "Follow First" setting to prioritize Task Transition conditions, ensuring the workflow follows the most relevant path first. Additionally, create actions for Microsoft Exchange Online us
Module Overview
💡 Now that we have logic in the workflow that checks for specific values of the Microsoft "group" object properties, and we've connected to the "Microsoft Graph" path, we need to build a similar path for updating group membership using Microsoft Exchange Online.
Video (5:48 Minutes)
Step 1: Configuring the Transition Mode of the check_group_type action
Select the "check_group_type" noop.
Select the Advanced Tab.
Select "Follow First" under Transition Mode.
Step 2: Creating Microsoft Exchange Online Path
Rename the "add_or_remove" noop to "add_or_remove_graph".
Copy and Paste the "add_or_remove_graph" noop below the "Exchange Online" transition.
Rename the copied noop to "add_or_remove_exchange".
Connect the "Exchange Online" transition to the "add_or_remove_exchange" noop.
Step 3: Implementing Add to Group using Microsoft Exchange Online
Add the "Invoke Command" action from Microsoft Exchange Online below the "add" transition of the "add_or_remove_exchange" noop.
Select the InvokeCommand action.
Enter "Add-DistributionGroupMember" for Cmdlet Name.
Add the parameters:
Member: {{ CTX.user_id }}
Identity: {{ CTX.group_id }}
BypassSecurityGroupManagerCheck: {{ true }}
Rename the action to "add_group_member"
Step 4: Implementing Remove from Group using Microsoft Exchange Online
Copy and paste the "add_group_member" action from Microsoft Exchange Online below the "remove" transition of the "add_or_remove_exchange" noop.
Select the copied action.
Select the InvokeCommand action.
Enter "Remove-DistributionGroupMember" for Cmdlet Name.
Add the parameters:
Member: {{ CTX.user_id }}
Identity: {{ CTX.group_id }}
BypassSecurityGroupManagerCheck: {{ true }}
Rename the action to "remove_group_member"
Action Item
Add or remove users from groups, ensuring the workflow uses the correct actions based on the group type.