Application Permission to access sharepoint list is not working

Peterson, Kyle 21 Reputation points
2021-09-09T22:53:31.837+00:00

I am attempting to create a daemon that needs to read SharePoint lists and access files.
My code is working great with delegated permissions however I cant get the application permissions to work.
Using the application permissions I can read files. However I cannot open the SharePoint lists.

My administrators have granted admin consent for "Files.ReadWrite.All" and "Site.Read.All"
However when I view my access token it doesn't list "Site.Read.All". Instead it only lists …
"roles": [
"Files.ReadWrite.All"
],

We have tried adding all the SharePoint permissions but the token doesn't change.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,545 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,662 questions
0 comments No comments
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,016 Reputation points
    2021-09-10T02:28:27.237+00:00

    Hi @Peterson, Kyle ,

    You need to add MS Graph permissions "Site.Read.All", like the below:

    130937-image.png


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful