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 Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,113 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,740 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,717 questions
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 35,866 Reputation points Microsoft Vendor
    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,305 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.