Forum Discussion
eduardomedeiros
Apr 18, 2022Copper Contributor
Unique list item permissions with REST api invalid URL
Hello all,
I'm working on a simple flow that is currently with an error of invalid URL.
The steps are: From a List item I get a client name which I use to create a group. After that I break the item permissions, get the group id and create a variable for PrincipID and provide read-only permissions for that item.
It is not working and I have no clue why. With a pre-created group it works. Here are some prints.
Any suggestion or clue on what I am doing wrong? I have the same process as you can see for another group that already exists and it works.
Thank you in advance.
- I solved this, if anyone has a similar problem:
- Inicialize variable as integer
- Pass variable to a string
Thank you.
- eduardomedeirosCopper ContributorI forgot to add but this is the Error outputs:
{
"statusCode": 400,
"headers": {
"Pragma": "no-cache",
"x-ms-request-id": "f620ca02-0b92-4c61-9a08-f04298233bfb",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"Cache-Control": "no-store, no-cache",
"Set-Cookie": "ARRAffinity=512d29ad664ee83218c06080ff64f669427e410db7510c1ba3db28695213c3be;Path=/;HttpOnly;Secure;Domain=sharepointonline-we.azconn-we-002.p.azurewebsites.net,ARRAffinitySameSite=512d29ad664ee83218c06080ff64f669427e410db7510c1ba3db28695213c3be;Path=/;HttpOnly;SameSite=None;Secure;Domain=sharepointonline-we.azconn-we-002.p.azurewebsites.net",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "true",
"x-ms-apihub-obo": "true",
"Date": "Thu, 14 Apr 2022 17:19:50 GMT",
"Content-Length": "630",
"Content-Type": "application/json",
"Expires": "-1"
},
"body": {
"status": 400,
"message": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\"http://www.w3.org/TR/html4/strict.dtd\">\r\n<HTML><HEAD><TITLE>Bad Request</TITLE>\r\n<META HTTP-EQUIV=\"Content-Type\" Content=\"text/html; charset=us-ascii\"></HEAD>\r\n<BODY><h2>Bad Request - Invalid URL</h2>\r\n<hr><p>HTTP Error 400. The request URL is invalid.</p>\r\n</BODY></HTML>\r\n\r\nclientRequestId: f620ca02-0b92-4c61-9a08-f04298233bfb",
"source": "https://mysite.sharepoint.com/_api/web/lists/getbytitle('ListName')/items(115)/roleassignments/addroleassignment(principalid=116%0A%0D,roledefid=1073741826)",
"errors": []
}- eduardomedeirosCopper ContributorI solved this, if anyone has a similar problem:
- Inicialize variable as integer
- Pass variable to a string
Thank you.