cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LucasA
New Member

Bad Gateway during approval (major version is submitted for approval, not minor)

Hi all, not sure where I'm going wrong.

I have a SharePoint site with a site pages library where we post news and pages. Any news or page has to go through an approval process. We built a custom approval process that skips the approval process under certain circumstances. Since the beginning of last week I keep running into a strange problem:

I can approve news articles just fine, but when I try approving a page (not promoted state: 2), my flow keeps failing with the following error message:

 

"message": "BadGateway",

    "innerError": {

      "status": 500,

      "message": "The current state of the item is Approved and the following action Submit cannot be implemented…

    }


Specifically, it seems as if only the latest major version (for example 65.0) is submitted for approval (even though the library shows version 65.X), and then the approval status is 'Approved' and trying to set the approval status back to 'Submit' doesn't work. This wasn't the case before and nobody as far as I know tampered with the flow or the library.1. Here we can see the version in Site Pages1. Here we can see the version in Site Pages2. Here we can see that the last major version was submitted (which is approved)2. Here we can see that the last major version was submitted (which is approved)approval_3.png

Any help or thoughts are appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
LucasA
New Member

@annajhaveri Thanks for the comment. It wasn't exactly this, but it did make me think about versioning again and in the end I found the issue, which is embarrassingly simple:
A colleague had changed permissions on that specific page because they didn't want people with editing permissions to change it. As a result, the account whose connection is used in the flow couldn't "see" the minor version, only the last major version. Therefore it always submitted the last major version instead of the latest draft for approval. I changed it now so that this specific account (which is an admin account anyway) is added to our standard SPO Admin group, which can access any SharePoint site. Thanks for the help!

View solution in original post

2 REPLIES 2
annajhaveri
Community Champion
Community Champion

@LucasA  are you creating a minor version to set the status, please take a look at this post, you might be experiencing the same issue https://powerusers.microsoft.com/t5/Building-Flows/Sharepoint-List-Approval-Set-Content-Approval-Sta...

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
LucasA
New Member

@annajhaveri Thanks for the comment. It wasn't exactly this, but it did make me think about versioning again and in the end I found the issue, which is embarrassingly simple:
A colleague had changed permissions on that specific page because they didn't want people with editing permissions to change it. As a result, the account whose connection is used in the flow couldn't "see" the minor version, only the last major version. Therefore it always submitted the last major version instead of the latest draft for approval. I changed it now so that this specific account (which is an admin account anyway) is added to our standard SPO Admin group, which can access any SharePoint site. Thanks for the help!

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,480)