Dear Jasmin,
Thank you for posting in Microsoft Community.
I understand the challenge you're facing where your Power Automate flow shows as successful for removing a user from a Planner task, but the user remains assigned in Planner. This can definitely be perplexing, especially when adding users works seamlessly and manual removal is possible. This issue is often related to how the Planner API handles updates to assigned users.
Here’s a breakdown of why this might be happening and the recommended approaches to ensure users are successfully unassigned:
1.Using the Specific "Unassign users from a task" Action:
Power Automate provides a dedicated action specifically for removing users. If you're attempting to remove users by only "Update task" or "Assign users" and simply leaving out the user you want to remove, the Planner API might not interpret this as an instruction to remove them, especially if you're not sending the complete, updated list of all remaining assignees.
- Solution: Ensure you are using the "Unassign users from a task" action in your Power Automate flow. This action is designed for this specific purpose and usually requires the Task ID and a semicolon-separated list of the User IDs (or emails, if supported by the action's configuration) you wish to remove. This is generally the most reliable method.
2.Planner Tasks Use a Multi-Value Assigned Users Property:
If the dedicated "Unassign users from a task" action is not available or not suitable for your specific flow design, you might be trying to manage assignments by updating the task's "Assigned To" property. When you update a multi-value property like "Assigned To" via the "Update a task" action, you typically need to provide the entire, new list of assigned users. If you only specify the user to remove without including the rest of the currently assigned users, Planner may ignore the update or revert it, as it expects the full current state.
- Solution:
- Retrieve the Current Assigned Users List: Use the "Get task details" action to fetch the task's current list of assigned users.
- Build a New Assigned Users List (Excluding the User to Remove): In your flow, create a collection or string variable that contains all the users who should remain assigned to the task, explicitly excluding the one(s) you want to remove.
- Update the Task with the New List: Use the "Update a task" action and feed this newly constructed list (containing only the desired assigned users) back into the "Assigned To" property. This overwrites the previous list with your desired assignments.
3.Issues with Deleted or Former Users:
If the user you are trying to remove has been deleted or is no longer an active user in Azure AD, Planner may struggle to update assignments related to that "stale" user entry. Tasks assigned to such users might sometimes appear as assigned to a generic "Member" or become difficult to manage programmatically.
- Solution: If the user is a deleted Azure AD account, programmatic removal via Power Automate might be inconsistent or impossible. In such cases, manual removal directly within the Planner UI or, in extreme cases, recreating the task entirely might be necessary.
Additional Notes:
- After running your Power Automate flow, allow a few minutes for Planner to synchronize. Sometimes, the Planner interface (especially in Teams) might display cached information.
- Confirm you are using the correct User ID format (e.g., Azure AD object ID vs. User Principal Name vs. email address) for the specific Power Automate action you're using. You can often obtain the correct User ID using a "Get user (V2)" action from the Azure AD connector.
I hope this information helps clarify the situation and provides you with workable solutions. Should you have any further questions or need additional assistance, please don't hesitate to reach out. We're always here to help. Have a wonderful day!
Kind regards,
Kai-L - MSFT | Microsoft Community Support Specialist