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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Set content Approval s...
Power Automate
Unanswered

Set content Approval status in a Sharepoint library

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

I'm trying to build my first flow for users to submit the document for approvals (manually with a trigger "for the selected item" if I named it correctly in English) and after approvals it will set the content approval status. It works when the flow is started by me (I'm the site owner and have approval rights), but when it is starting by a site member the action ends with an error:

     "code"502,
    "source""msmanaged-na.azure-apim.net",
    "clientRequestId""df391b75-b522-48e2-ace0-97091a0c84f3",
    "message""BadGateway",
    "innerError": {
      "message""Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))\r\nclientRequestId: df391b75-b522-48e2-ace0-97091a0c84f3\r\nserviceRequestId: 5357719e-1071-6000-935c-24d51f16f843",
      "status"502

I guess the problem is the user who launched the flow doesn't have rights to approve the content. Can I give these rights to the flow?

 

Categories:
I have the same question (0)
  • v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    I have made a test on my side and the issue is conformed on my side.

     

    Please modify the "sharepoint members" permission to "Edit" or "Full control" in site permissions of the sharepoint library refer to screenshot below:

    Capture.PNG

    Capture.PNG

     

    When the "sharepoint members" permission is modified to "Edit" or "Full control", the member would have the primission to run the flow to set content approval status.

     

     

    Please let me know if your problem could be solved.

     

     

    Best regards,

    Alice

     

     

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Alice,

    Thank you for the answer. I sure it works, but the idea was that site members and visitors could not approve the documents and see unapproved ones. Documents need to be approved only by the flow or the site owner.

  • v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Documents could only be approved by the site owner,

     

    If you want the user to run the flow to Set content Approval status in a Sharepoint library, you could let the user to modift the connection in the "Set Content approval status" action to your account, as screenshot below:

    Capture.PNG  

     

    If the user don't modify the connection in the "Set Content approval status" action to your account, he couldn't Set content Approval status to a document.

     

    Best regards,

    Alice

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks Alice,

    I don't know how to let the user to modify his connections to my account, but I tried to set him as the flow's owner. On the user's side all the connections look mine, but setting content approval status still didn't work until I modified his permissions to full control (but this decision still doesn't work for me).

  • Badr Profile Picture
    2 on at

    Hi guys,

     

    Is there any update ?

     

    I'm facing the same issue, all flow connections are set to my global admin / Flow owner / Site Collection Admin and it works when the flow is executed from this account.

     

    When the flow is executed from a member who has collaboration permissions on the document library, it fails with Bad Gateway, Status Code 502 :

    "innerError": {
    "status": 500,
    "message": "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))\r\nclientRequestId: 487e131c-9d83-473d-a58d-750b889533d0\r\nserviceRequestId: e27ab99e-40b6-7000-652b-03ae66f810b1"
    }

    Best regards

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 67

#2
David_MA Profile Picture

David_MA 64 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 39 Most Valuable Professional

Last 30 days Overall leaderboard