cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SiljeDN
Frequent Visitor

Error message on my approval condition

Hi. 

I get an error message on the approval condition when I run a test of my flow. I have checked security roles and other accesses but I'm struggling to find out what the problem really is.


Do anyone have an answer or workaround to this error message?



Forbidden. The request failed. Error code: 'XrmApprovalsGeneralPermissionsError'. Error Message: 'Encountered a general permissions error trying to access the CDS database. This could be caused by modification of the approvals administrator or user roles, or by an incompatible plugin. Detailed message: 'The cache request to assign a role failed with status code 'Forbidden' and message: 'Message: RoleService::VerifyCallerPrivileges failed. User: 72aa5ea3-1d0d-ea11-a811-000d3ab3639c, PrivilegeName: prvActivateSynchronousWorkflow, PrivilegeId: dd55297d-5aaa-4645-8ef5-a2348eab3460, Depth: Basic, BusinessUnitId: 1199e44e-1ce9-e611-80ed-5065f38be571 Code: 0x80040220 InnerError: Type: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]] Message: RoleService::VerifyCallerPrivileges failed. User: 72aa5ea3-1d0d-ea11-a811-000d3ab3639c, PrivilegeName: prvActivateSynchronousWorkflow, PrivilegeId: dd55297d-5aaa-4645-8ef5-a2348eab3460, Depth: Basic, BusinessUnitId: 1199e44e-1ce9-e611-80ed-5065f38be571 StackTrace: at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Associate(EntityReference entityReference, Relationship relationship, EntityReferenceCollection relatedEntities, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, Dictionary`2 optionalParameters) at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.Associate(EntityReference entityReference, Relationship relationship, EntityReferenceCollection relatedEntities) at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.UpdateResourceNavigationPropertyReference(CrmODataExecutionContext context, String edmEntityName, String entityKeyValue, String navigationPropertyName, CrmEdmEntityReference edmPropertyReference) at Microsoft.Crm.Extensibility.OData.EntityController.UpdateNavigationRefInternal(String entityName, String key, String navigation, Uri link) at Microsoft.Crm.Extensibility.OData.EntityController.PostNavigationRefImplementation(String entityName, String key, String navigation, Uri link) at Microsoft.Crm.Extensibility.OData.EntityController.<>c__DisplayClass20_0.<PostNavigationRef>b__0() at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties) at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func) at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext() InternalException: '.''.

 

 

 

Flow - Error message.PNG

7 REPLIES 7
v-litu-msft
Community Support
Community Support

Hi @SiljeDN,

 

Do you still have the problem?

 

There is a problem with the same issue, it seems like a temporary problem:

https://powerusers.microsoft.com/t5/Using-Flows/Flow-Approvals-cause-my-Flow-to-fail/m-p/240897

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, 

 

Thanks for the quick reply.

Yes, I still have the same problem. I've tested the flow several times both today and yesterday and I still get the same error message. 

 

Best Regards,

Silje

Hi @SiljeDN,

 

Ok, could you please share the details of the Approval action?

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, 

 

Here's the details 🙂

Thank you! 

 

 

Approval.PNG

 

 

 

 

{
"inputs": {
"host": {
"connectionName": "shared_approvals",
"operationId": "StartAndWaitForAnApproval",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_approvals"
},
"parameters": {
"approvalType": "Basic",
"WebhookApprovalCreationInput/title": "test approval",
"WebhookApprovalCreationInput/assignedTo": "@outputs('Get_Manger')?['body/internalemailaddress']",
"WebhookApprovalCreationInput/requestor": "@outputs('Get_user')?['body/internalemailaddress']",
"WebhookApprovalCreationInput/enableNotifications": true,
"WebhookApprovalCreationInput/enableReassignment": true
},
"authentication": "@parameters('$authentication')"
}
}

Hi @SiljeDN,

 

So the Assigned to field should be: @outputs('Get_Manger')?['body/internalemailaddress']

and the Requestor field should be: @outputs('Get_user')?['body/internalemailaddress']

 

The Assigned to and Requestor fields will get values from the Get manager action and Get user action. If the two values are invalid, it will report an error, you can use two Compose actions before the start and wait for an approval action and input the two value into them to check the two emails whether could get from the previous steps. If it couldn't, the error would be item of CDS entities, if it could, the error would be the syntax about CDS, you can input the output of Composes into Approval action to test it.

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, 

 

We have added compose and it looks like the emails are in the right format: 

 

Can you verify if theres anything else we can do or test? 🙂 

 

 

Skjermbilde3.PNG

 
FredrikSE
Regular Visitor

Resolved the issue by doing the following: 
By looking up the GUID of the User to find the users name. Did this, by exporting all contacts from CRM to Excel and use search to find the name of the User with matching GUID, then lookup the user by name in CRM, to further look at the users permissions. Had to give the user Approval permissions to make the "Start and wait for approval" function to work.

To sum up, make sure the user have approval permission when using "Start and wait for approval". 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,394)