2

According to the suggested answer in

how to show items to users that made their requests but allow admins/managers to view all items in Sharepoint?

and

http://www.ktskumar.com/2017/01/access-sharepoint-online-using-postman/

I was able to get the access token, client id and client secret using Postman.

Now that I am trying to use them in HTTP connector of Microsoft Flow as stated in these:

https://praveensharepointknowledgebase.wordpress.com/2018/04/23/item-level-permissions-using-microsoft-flow/

https://noellawlor.wordpress.com/2018/01/18/setting-sharepoint-item-list-permissions-with-flow/

I find the Get Access token component as stated in both doesn't work in my flow. Here is the image:

enter image description here

Here's the error description which I am getting in the response json:

"error_description": "AADSTS500012: Resource application name '00000003-0000-0ff1-ce00-000000000000/mycompany.sharepoint.com@3a505637-8fd6-4d12-b49f-409f1f13af04' is not valid.\r\nTrace ID: 66838e7c-4f81-4668-b1d6-e335284d8b00\r\nCorrelation ID: 359f6027-eeb2-4bbe-90a2-01bea0d178fe\r\nTimestamp: 2019-04-01 19:47:12Z",

or it says Unauthorized if I remove /human_resources from the request body resource parameter enter image description here

I really have no idea why it is happening. I was able to fetch everything in Postman but it fails here in the Microsoft flow.

5
  • it seems strange that you get the unauthorized on the root. I recently had a problem with accessing bin and it came out to the issue that someone has deleted read permission to all authenticated users on the root site. Other question is your human resources created at this url or at sites\human_resources? Apr 2, 2019 at 8:52
  • its like mycompany.sharepoint.com/human_resources. Yes it's one of the sites in mycompany page Apr 2, 2019 at 12:24
  • Do I need to assign 'Read' permissions before asking for access token? Apr 2, 2019 at 12:26
  • Well account that executes the WF should have an access; it wouldn't hurt to test. Apr 2, 2019 at 13:42
  • Well most of the user groups have Full Control, Contribute and Read permissions on list items due to Permissions Hierarchy from parent site Apr 2, 2019 at 13:55

2 Answers 2

1

The answer lies in this link:

https://sharepointmadeeasy.blogspot.com/2018/02/microsoft-flow-http-rest-api-invalid.html

There were the special characters in request body that had to be encoded for URI and that helped me obtain the access token for further steps

0

In below link step by step item level permission explained:

https://sergeluca.wordpress.com/2018/05/03/assign-unique-permissions-to-a-document-with-the-new-send-an-http-request-to-sharepoint-action-how-to-use-the-sharepoint-rest-api-in-flow/

Regards,
Chandani Prajapati

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.