cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
McThrustin
Level: Powered On

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?

6 REPLIES 6
sebastienlevert
Level: Power Up

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!

McThrustin
Level: Powered On

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.

JamesBrownMIS
Level: Powered On

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

Did you get much further with MS on this?

panterra
Level 8

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

Lexnnn
Level: Powered On

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:

flow1.PNG1flow2.PNG2flow3.PNG3flow4.PNG4flow5.PNG5flow6.PNG6flow7.PNG7flow8.PNG8

 

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

Hope this helps!

Michaelcwang2
Level: Power Up

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.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (3,907)