“I successfully delegated a task but the user doesn’t see it, do I have to somehow share the Dataverse row too in my Power Automate flow?”
If you followed my previous article on task delegation, you maybe noticed that it’s not perfect. The original task was closed and a new one exists, yet the approvers don’t see it. It’s not in their web approval portal, not in their Teams approvals application, it’s only in the Dataverse table. That’s not the desired result – what’s the point of delegation if they can’t finish the task?
Why they don’t see it?
As explained in the real-time approval tracking article, approvals are not in a single table. Each task information is spread among multiple tables – Approvals, Approval Requests, Approval Responses, etc. For now it’s enough to know that the Approvals table keeps the high level approval information, e.g. Title or Link, and the Approval Requests table contains the tasks for each approver. What you see in all the approval applications is combination of these tables/rows. And to see their combination, you must have access to both. Which the delegate users don’t have – they have access only to their “new” task.
How to share the task?
To see the task in their approval list you must share with them also the related task in the Approvals table. That means sharing a Dataverse row with them (as indicated by the article title).
Share the row using the ‘Perform an unbound action’ Dataverse action via ‘Grant access’.
Target is a row in the Approval table with a specific id (the approval id).
{
"@{string('@odata.type')}": "Microsoft.Dynamics.CRM.msdyn_flow_approval",
"msdyn_flow_approvalid": "<approval Id>"
}
You can see that I’m using the string(…) expression to input the ‘@data.type’ string as Power Automate doesn’t like properties starting with @.
The second parameter is the PrincipalAccess. That’s where you define the permissions (AccessMask) and who should get them (Principal).
{
"AccessMask": "ReadAccess,AppendAccess,AppendToAccess",
"Principal": {
"@{string('@odata.type')}": "Microsoft.Dynamics.CRM.systemuser",
"systemuserid": "<user id from User table>"
}
}
The full list of available permissions is here.
Once you perform the action it’ll share the approval task with the new assignee and it’ll appear in his task list.
Summary
Every time you start messing with the Dataverse data, you should make sure that you handle also the permissions correctly. In this situation it’s nice to delegate a task to another user, but not so if he can’t complete it. That’s why you must share also the corresponding Dataverse row during the delegation by adding one more step to your Power Automate flow. Once they have the task and they can see the main approval task, you can start delegating the tasks across your organisation and users will complete them.