![](https://i0.wp.com/sharepains.com/wp-content/uploads/2023/01/sharepoint-microsoft-graph.png)
In this post a variety of options on how to use Microsoft Graph for SharePoint within Power Automate.
My Microsoft Graph Series, so far
I will start with a quick overview of the Microsoft Graph posts that I published recently.
- MS Graph API Authentication in Introduction
- Manage Users with the Graph API
- Manage calendars and events
- The Subscription model within Graph API using Power Automate
- Read Excel files faster using the Graph API
- Update Excel files using the Graph API
SharePoint and the Graph API
First of all the SharePoint connector within the Power Platform is quite good, so if you can avoid any direct API calls then please do so.
Then we have a few different SharePoint APIs available to us to manage SharePoint Online.
- SharePoint REST API v1
- SharePoint REST API v2
Ok, that is just two different versions isn’t it?
No!
The SharePoint REST API v1 documentation is a bit unstructured, but in short this is the older REST API that has been available for a long time. The SharePoint REST API v2 is based on the Graph API.
From the v2 page mentioned above I copied the table below.
The above table is a very important part of understanding how we should access the SharePoint REST API within Power Automate.
So we can access Graph API URL through a SharePoint based URL.
Now look at our options.
Access the SharePoint Graph API within Power Automate
We could access the Graph API using the HTTP action
![How to use Microsoft Graph for SharePoint within Power Automate 24 How to use Microsoft Graph for SharePoint within Power Automate Microsoft Office 365 image 46](https://i0.wp.com/sharepains.com/wp-content/uploads/2023/01/image-46.png?resize=640%2C382&ssl=1)
Ok, this is premium! So we want to avoid this if we can. Sorry Microsoft!
But we also have the Send an HTTP request to SharePoint action. The examples in this action show use the v1 REST API and in the past I tried typing https://graph.microsoft.com in the Site Address, but that doesn’t work.
![How to use Microsoft Graph for SharePoint within Power Automate 25 How to use Microsoft Graph for SharePoint within Power Automate Microsoft Office 365 image 47](https://i0.wp.com/sharepains.com/wp-content/uploads/2023/01/image-47.png?resize=640%2C271&ssl=1)
So if we now look at that table that I copied earlier, we can configure the Send an HTTP request to SharePoint as follows and we can get the details of our site.
![How to use Microsoft Graph for SharePoint within Power Automate 26 How to use Microsoft Graph for SharePoint within Power Automate Microsoft Office 365 image 48](https://i0.wp.com/sharepains.com/wp-content/uploads/2023/01/image-48.png?resize=640%2C325&ssl=1)
Very Important note!
Please do not forget the Accept Header.
If you forget to include the Accept header with application/json then you will get an error:
![How to use Microsoft Graph for SharePoint within Power Automate 27 Unexpected response from the service](https://i0.wp.com/sharepains.com/wp-content/uploads/2023/01/image-49.png?resize=640%2C667&ssl=1)
SharePoint End Points to access
Earlier we saw that we can access sites, drives, drive and lists.
It would be too much to go through all the end points for one post and the documentation of the Graph API is good (other than that I would like to see Power Automate examples next to the C# and JavaScript examples. But maybe that will arrive one day. If you need any help with any of the end points then please feel free to open the chat on this site.
Continue Reading Pieter Veenstra’s Article on their blog
How to use Microsoft Graph for SharePoint within Power Automate
In this post a variety of options on how to use Microsoft Graph for SharePoint within Power Automate. I will start with a quick overview of the Microsoft Graph posts that I published recently. First of all the SharePoint connector within the Power Platform is quite good, so if you can avoid any direct API calls then please do so.
Blog Syndicated with Pieter Veenstra’s Permission
More About This Author
Array
Modern Workplace26 March 2024Receive the available storage within your SharePoint Online tenant
Modern Workplace20 March 2024Options for Documenting Your Power Apps: Comments, Code, and Controls
Modern Workplace18 March 20242 ways to duplicate SharePoint Lists to support your Power Apps
Modern Workplace14 March 2024Update a Hyperlink Column in SharePoint with Power Automate