cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
NPBA_AT
Level 8

Send HTTP Request to Sharepoint fails with Status 400 Bad Request

I have been trying to use the Sharepoint “Send an HTTP request to Sharepoint’ Flow action to try to set custom permissions based on this blog entry:

 

https://sergeluca.wordpress.com/2018/05/03/assign-unique-permissions-to-a-document-with-the-new-send...

 

and I’ve been looking at this as well to try to ensure that I am structuring the query correctly:  https://gnanasivamgunasekaran.wordpress.com/2016/06/10/sharepoint-rest-api-url-for-accessing-working...

 

I have been trying to run these queries in a browser as well, but no matter what I do I get some form of the same error:

 

Run from web browser

https://orgname.sharepoint.com/sites/NZFormsTest/_api/web/lists/getbytitle(%E2%80%98NZEC_EmployeeReq...

<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

<m:code>

-1, Microsoft.SharePoint.Client.InvalidClientQueryException

</m:code>

<m:message xml:lang="en-US">

The expression "web/lists/getbytitle(‘NZEC_EmployeeRequests’)/items" is not valid.

</m:message>

</m:error>

 

Run from Flow

Pic1.png

The expression "lists/web/getbytitle(‘NZEC_EmployeeRequests’)/items(11)/breakroleinheritance(copyRoleAssignments=true, clearSubscopes=false)" is not valid.

clientRequestId: 9c3c1097-d147-425b-afbd-4ef1aa455e13

serviceRequestId: 40afc19e-30e7-8000-15b5-e8e34d332c79

 

The only query that I managed to run successfully was this one, run from Flow:

Pic2.png

 

Can anyone shed any light on what I'm doing wrong? I am a site owner of this Sharepoint site and NZEC_EmployeeRequests is the name of a list in that site. Is there some other kind of permissions that I need to be able to run these requests?

1 ACCEPTED SOLUTION

Accepted Solutions
NPBA_AT
Level 8

Re: Send HTTP Request to Sharepoint fails with Status 400 Bad Request

Posting this in case anybody else is having the same issue....

I’ve found out what the problem is…the single quotes are not right. Apparently an issue with copying text including single quotes from web pages. I re-entered all my single quotes in these actions and now my whole Flow runs.

Simple fix when you know what the issue is...very frustrating trying to work out what's wrong if you don't.

View solution in original post

1 REPLY 1
NPBA_AT
Level 8

Re: Send HTTP Request to Sharepoint fails with Status 400 Bad Request

Posting this in case anybody else is having the same issue....

I’ve found out what the problem is…the single quotes are not right. Apparently an issue with copying text including single quotes from web pages. I re-entered all my single quotes in these actions and now my whole Flow runs.

Simple fix when you know what the issue is...very frustrating trying to work out what's wrong if you don't.

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 212 members 3,189 guests
Please welcome our newest community members: