According to the suggested answer in
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://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:
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
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.