Access sharepoint through Microsoft Graph

Sweb 20 Reputation points
2023-08-14T11:00:25.4233333+00:00

I would like to edit an Excel file that's on Sharepoint.

I went in Azure App registrations and made an app.

Under Api permissions have added these permissions, but If I try to call any endpoint, let's say https://graph.microsoft.com/v1.0/sites

API Permissions

Microsoft 365 and Office SharePoint For business Windows
Microsoft 365 and Office Excel For business Windows
Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2023-08-15T06:12:25.23+00:00

    Hello Sweb,

    This error might appear that your client application has only requested delegated permissions to Microsoft Graph, whereas application permissions should be requested for the scenario attempted here. Please configure permissions you need, and click grant admin consent button.

    enter image description here


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. TH-4749-MSFT 3,315 Reputation points
    2023-08-14T15:38:01.15+00:00

    Hello Sweb,

    Thanks for reaching out. To assist you better please provide the below information:

    1. Please provide the endpoints you have tried and the error you are receiving. Screenshots would be appreciated.
    2. Which application are you calling the endpoints from (Graph Explorer, Postman)?

    To get a list of sites you can try the query https://graph.microsoft.com/v1.0/sites?Search=*

    Thanks.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.