web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

SharePoint Document Approval fails when Rejecting the file

(0) ShareShare
ReportReport
Posted on by 33

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,

1.png2.png3.png

 

The Error Details are,

bartvaneynde_0-1636043827218.png

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,

bartvaneynde_1-1636043982089.png

 

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.

I have the same question (0)
  • Verified answer
    ScottShearer Profile Picture
    25,242 Most Valuable Professional on at
    Re: SharePoint Document Approval fails when Rejecting the file

    @bartvaneynde 

    Can you try deleting and re-adding the Set content approval action that fails and let me know if this resolves te issue?

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard