Hi,
I have a flow that should get list of all files in a Sharepoint directory and put the the list in a pre-existing table in an Excel file. Often there can be hundreds, even thousands, of files in the folder and I found that using the Excel connector took about 2 seconds to add each row, which is way too slow to be practical. After researching I found that it can be done using the MS Graph API and an HTTP POST request. However, when I try it the flow works until it gets to the HTTP request then stops with the error - "Either scp or roles claim need to be present in the token.".
The MS Graph permissions I have added to my app are Files.Read, Files.ReadWrite, Files.ReadWrite.All and Files.ReadWriteAppFolder. I think I read somewhere that I need to use Application Permissions not just Delegated permissions, but I do not know what that means and also the application permissions require Admin Consent. I work in a large corporation and do not even know who that would be and whether they would give me the required permissions. I do not understand why I should need administrative consent to add rows to a table in an Excel file that I created and own. Also, I need to know which permissions I need for the MS Graph API.
Here is the HTTP Post Request in full - what is wrong with it?
I have done a similar call using App-Only authentication. I have shown here how to confirm what permissions are required for respective graph api, how to add those permission in app in AAD and in the end how to use the app to call the respective api. Hope this will help you
https://www.youtube.com/watch?v=tHmYp7Qh9Dg&list=PLR5fMDkX5kHz5Hsu2n8x6kt0t2nIVRviu
Dear Partner,
You need to provide required permission, please refer to the link below
https://techcommunity.microsoft.com/t5/microsoft-graph-security-api/authentication-issues/m-p/193734
Did I answer your question? Please consider to mark my post as a solution to help others.
Regards,
Mohamed Sanuj Basheer
I am it was sorry for the abrupt end. I tried to add an picture of the HTTP Request from Power Automate but it was removed along with the end which read:
Thank you very much,
Chris
As I cannot seem to add the image:
WarrenBelz
146,776
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,093
Most Valuable Professional