Hello All,
I have created a document approval flow in Power Automate; the document library is created in SharePoint. The approval flow is working fine when I (1) upload the document, (2) start the approval, and either (3) approve or reject the file. The approval flow also works if a member of the SharePoint site (1) uploads the document, (2) starts the approval, and (3) I approve the file; when I reject the file in this situation, the approval status of the file never changes to "Rejected", and the flow fails.
The flow looks like,
The Error Details are,
The Outputs of the object shows,
{
"statusCode": 502,
"headers": {
"Vary": "Origin",
"X-SharePointHealthScore": "2",
"X-MS-SPConnector": "1",
"X-SP-SERVERSTATE": "ReadOnly=0",
"DATASERVICEVERSION": "3.0",
"SPClientServiceRequestDuration": "1100",
"SPRequestGuid": "dc9b6ed9-6bcf-4d60-b6e5-b1a355dd1746",
"request-id": "dc9b6ed9-6bcf-4d60-b6e5-b1a355dd1746",
"MS-CV": "2W6b3M9rYE225bGjVd0XRg.0",
"Strict-Transport-Security": "max-age=31536000",
"X-FRAME-OPTIONS": "SAMEORIGIN",
"Content-Security-Policy": "frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com *.powerapps.com *.yammer.com *.officeapps.live.com *.office.com *.stream.azure-test.net *.microsoftstream.com *.dynamics.com;",
"MicrosoftSharePointTeamServices": "16.0.0.21820",
"X-Content-Type-Options": "nosniff",
"X-MS-InvokeApp": "1; RequireReadOnly",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "true",
"Cache-Control": "max-age=0, private",
"Date": "Thu, 04 Nov 2021 16:24:56 GMT",
"P3P": "CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"",
"X-AspNet-Version": "4.0.30319",
"X-Powered-By": "ASP.NET",
"Content-Length": "461",
"Content-Type": "application/json",
"Expires": "Wed, 20 Oct 2021 16:24:55 GMT",
"Last-Modified": "Thu, 04 Nov 2021 16:24:55 GMT"
},
"body": {
"error": {
"code": 502,
"source": "flow-apim-msmanaged-na-centralus-01.azure-apim.net",
"clientRequestId": "dc9b6ed9-6bcf-4d60-b6e5-b1a355dd1746",
"message": "BadGateway",
"innerError": {
"status": 500,
"message": "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))\r\nclientRequestId: dc9b6ed9-6bcf-4d60-b6e5-b1a355dd1746\r\nserviceRequestId: dc9b6ed9-6bcf-4d60-b6e5-b1a355dd1746"
}
}
}
}
The run-only permissions for the flow are,
Does anyone have an explanation for this behavior?
How can I rework the flow so it works in both situations (approving and rejecting) if a member of the SharePoint starts the flow? Thank you.


Report
All responses (
Answers (