I am currently building an approval flow that will need the requirement to cancel a current approval. I was able to find a few discussions on how to complete this task using the common data services feature within Power Automate but I am running into a security issue. The error states that I need the 'prvWritemsdyn_flow_approval' privilege.
My question is on how/where to set this permission. Can anyone spell this out for me or point me in the right direction?
Thanks for the help
Solved! Go to Solution.
Hello @MAYLIWK
Sorry I came down with a cold and a walkthrough slipped my mind.
So get your admin to try this:
1) head to Power Platform admin center
https://admin.powerplatform.microsoft.com/support
2) Click Data Policies
3) Click Environments
4) Select the Environment that your Flow is in
5) Here you see 3 tabs <Details, Security, and Resources>
Click Security tab
6) Now click the button Assign security roles
7) A new screen will pop up, with a list of all users in the Environment. Search for the User that is using the CDS connection
This is most likely your account, but best practice would be to have a service account.
😎 Click on the user > which will bring up another pop up. In the top header click Manage Roles
9) Here is all the default roles (and custom roles if any were made) The roles you will most likely need is:
Approvals User. If you still get the error. Than try the Approvals Administrator.
Depending on your.
I have attached some screenshots of the above steps.
If you have any issues or problems after applying the above fix.
Please post the error message from flow
Thanks
Here is the Pictures:
Hope this helped.
—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
Proud to be a Flownaut!
Proud to be a Flownaut!
Thanks for the response. Could you post the instructions? I will have to take them to the team. Also, if you have any links about how the CDS work, I would appreciate that as well. I haven't been able to find anything useful.
Proud to be a Flownaut!
Hello @MAYLIWK
Sorry I came down with a cold and a walkthrough slipped my mind.
So get your admin to try this:
1) head to Power Platform admin center
https://admin.powerplatform.microsoft.com/support
2) Click Data Policies
3) Click Environments
4) Select the Environment that your Flow is in
5) Here you see 3 tabs <Details, Security, and Resources>
Click Security tab
6) Now click the button Assign security roles
7) A new screen will pop up, with a list of all users in the Environment. Search for the User that is using the CDS connection
This is most likely your account, but best practice would be to have a service account.
😎 Click on the user > which will bring up another pop up. In the top header click Manage Roles
9) Here is all the default roles (and custom roles if any were made) The roles you will most likely need is:
Approvals User. If you still get the error. Than try the Approvals Administrator.
Depending on your.
I have attached some screenshots of the above steps.
If you have any issues or problems after applying the above fix.
Please post the error message from flow
Thanks
Here is the Pictures:
Hope this helped.
—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
Proud to be a Flownaut!
We setup a service account with these permissions but I am still running into an error. Please see below.
\"error\":
{\"code\":\"0x80040220\",\"message\":\"Principal user (Id=aaf78868-6272-e911-a81d-000d3a37ff78, type=8, roleCount=4, privilegeCount=688, accessMode=0, is missing prvWritemsdyn_flow_approval privilege (Id=289a0b9e-b7c7-4265-992a-0b7b1e921c30) on OTC=10008. context.Caller=aaf78868-6272-e911-a81d-000d3a37ff78\",\"innererror\":
{\
"message\":\"Principal user (Id=aaf78868-6272-e911-a81d-000d3a37ff78, type=8, roleCount=4, privilegeCount=688, accessMode=0, is missing prvWritemsdyn_flow_approval privilege (Id=289a0b9e-b7c7-4265-992a-0b7b1e921c30) on OTC=10008. context.Caller=aaf78868-6272-e911-a81d-000d3a37ff78\",\
"type\":\"System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]\",\
Thanks for the help.
Hello @MAYLIWK
Can you try and look in the Users Entity and find out which user the error is mentioning
(the guid /ID) aaf78868-6272-e911-a81d-000d3a37ff78
If this is your service principal account, add the sysadmin role and see if this fixes the issue
If the user the error is mentioning, than that user will also need the roles i mentioned before
—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
Proud to be a Flownaut!
Thanks, turns out it was still using my account while testing.
One last question. I was able to update the approval record and it disappeared from the action items list on power automate website. However, it doesn't allow the workflow that's waiting for an approval response to continue after I update the approval record.
I manually cancelled an approval and looked at the approval record after I cancelled to compare the fields to what I am filling in. Looks like I have everything but one field. msdyn_flow_approval_result is coming back with a null for the record I canceled via power automate but it is coming back with "Canceled" for the approval I manually cancelled.
Manually cancelled meaning I went to my sent approvals with the Power Automate web site and hit the cancel button.
I cant see the field within power automate that this correlates to. Do you know if there is one or will I have to create my own "wait for an approval" action with a loop?
Thanks
Could you share a picture of what the flow looks like?
—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
Proud to be a Flownaut!
Not sure which one you wanted. Here is the approval flow:
and here is the cancel flow (its just a test flow for now being triggered by an http request that I fill in the IDS manually )
When you said you updated the Approval.
Is that from Flow or from the email / actions page?
Im wondering if you changed your action to Start and Wait for an Approval instead?
—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
Proud to be a Flownaut!
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
23 | |
13 | |
11 | |
10 | |
8 |
User | Count |
---|---|
32 | |
25 | |
24 | |
17 | |
16 |