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

Set Content Approval Status Action works as expected but always gives an error.

Hello,

 

I'm creating a custom approval workflow which allows employees to use the 'Start an Approval' Action to approve or reject items on a SharePoint Online List.

 


My flow is always erroring out on the 'Set Content Approval Status' step.  However, it appears to be doing what it's supposed to: it properly sets the Approved/Rejected status on the SharePoint List, and it adds the comments.

However, it also starts showing that it's 'retrying' up to 4 times, and it always ends with the following error:
01.PNG02.PNG


Outputs Details

4 Retries - Details:

1st Retry:

Duration: 1s
Start time: 2018-01-16T19:57:54.0902707Z
End time: 2018-01-16T19:57:55.2933899Z
Status: InternalServerError
Client request ID: 4ab2d389-9889-453e-b8bb-df35a746f33b
Service request ID: 4ab2d389-9889-453e-b8bb-df35a746f33b


Retry 2-4 (Start and end times differ, but same error):

Duration: 1s
Start time: 2018-01-16T19:58:32.8113726Z
End time: 2018-01-16T19:58:33.4832728Z
Status: BadGateway
Client request ID: 1c144d55-a01a-47e6-ba12-c38d0279fac5
Service request ID: 1c144d55-a01a-47e6-ba12-c38d0279fac5




Status Code: 502

Key Value

Pragmano-cache
x-ms-request-id331802e6-ec27-4875-94cc-3e9bd72e825d
Timing-Allow-Origin*
Cache-Controlno-cache
DateTue, 16 Jan 2018 19:59:19 GMT
Set-CookieARRAffinity=622c74dd20820a29ad038bb6f18c30fe85f84009541dc1341e4efd23c045ffea;Path=/;HttpOnly;Domain=sharepointonlineconnectionprovider-westus.tip0-westus.p.azurewebsites.net
X-AspNet-Version4.0.30319
X-Powered-ByASP.NET
Content-Length373
Content-Typeapplication/json; charset=utf-8
Expires-1


Body:

{
  "message": "The current state of the item is Denied and the following action Reject cannot be implemented\"\r\nclientRequestId: 331802e6-ec27-4875-94cc-3e9bd72e825d",
  "status": 502,
  "source": "https://[domain].sharepoint.com/teams/pm/_api/SP.APIHubConnector.SetApprovalStatus",
  "errors": [
    "-1",
    "Microsoft.SharePoint.SPConnectorException"
  ]
}

Anyone know why this is happening?

7 REPLIES 7
Highlighted
New Member

Re: Set Content Approval Status Action works as expected but always gives an error.

Were you able to resolve this issue? I have the exact same issue and was wondering if it was something with SharePoint Content Approval and Flow or if my Flow is done properly configured... Thanks!

Highlighted
Frequent Visitor

Re: Set Content Approval Status Action works as expected but always gives an error.

Hey @sebastienlevert,

 

No resolution yet but I am working with Microsoft on it.   Strangely, when I went to get the screenshots for my Flow errors, one of them had magically 'completed' successfully.  I have yet to further test this, but I suspect MS might have done some fixing in the background, though I'm not sure what.

I'll update with more info once I've had a chance to test.

Highlighted
Regular Visitor

Re: Set Content Approval Status Action works as expected but always gives an error.

Did you get much further with MS on this?

Highlighted
Advocate III
Advocate III

Re: Set Content Approval Status Action works as expected but always gives an error.

I am encountering this issue as well.  I'd be interested to hear if there is any news around how this action should work.

 

Thank you,

Sean

Highlighted
Helper II
Helper II

Re: Set Content Approval Status Action works as expected but always gives an error.

I have an approval list for creation of new O365 groups.

I wanted to approve the list items directly from the email using flow.

I tried out myself but for some reason it did not work but using the method described below, I was able to do it. Thank you to the author!

Found this solution: https://www.techmikael.com/2018/05/use-microsoft-flow-to-implement.html#comment-form

I tried it out, I also works for me for approval of Sharepoint list items. Really helpful since microsoft has not implemented list items in "set content approval status".

  

Note: the approval process can take some time, for test purpose, wait multiple hours, first time took time for some reason, now it works fine.

Note: In "set content approval status", in Library name use List name but not the one from the URL

eg. https://...sites/teamsites/team-orders and the list name is Team orders, use Team orders as library name and not team-orders.

 

I though of using PATCH function to update the "approval status" field instead of "Set content approval status" but I lack the developers knowledge to write the command

 

Flow below:

1122334455667788

 

Don't know if all these steps are needed but it works for me.

Hope this helps!

Highlighted
Frequent Visitor

Re: Set Content Approval Status Action works as expected but always gives an error.

Hi, @McThrustin 

I had similar issue here: https://techcommunity.microsoft.com/t5/PowerApps-Flow/Warning-message-quot-BadGateway-quot-and-quot-...

And simply check if eventually you used receive any solution from Microsoft Flow team, thank you.

Highlighted
Frequent Visitor

Re: Set Content Approval Status Action works as expected but always gives an error.

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (8,361)