web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Permission problem wit...
Power Automate
Unanswered

Permission problem with HTTP POST request to Excel, using MS Graph API

(0) ShareShare
ReportReport
Posted on by

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?

 
Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    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:

    HTTP POST Request.jpg

  • Verified answer
    mobashee Profile Picture
    on at

    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

    https://stackoverflow.com/questions/55790865/accessdenied-either-scp-or-roles-claim-need-to-be-present-in-the-token

     

    Did I answer your question? Please consider to mark my post as a solution to help others.

     

    Regards,

    Mohamed Sanuj Basheer

     

  • Akash2505 Profile Picture
    2 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard