REST programming in SharePoint is straightforward. Microsoft has shared the latest REST way of programming for SharePoint through Graph API. Microsoft Graph APIs are a rich source of APIs for accessing various resources of Office365 like SharePoint, Users, Onedrive. We will focus on SharePoint here.

Why use Graph API in SharePoint?

  • Letting developers develop from other platforms like iOS and Android
  • Like AI coding. Intelligent access from different sources
  • RESTful. Latest REST.
  • Any programming language


Use in production is not supported due to drastic changes. Sometimes, the results were not working in v1, and I had to change to the beta version.

However, I started seeing real SharePoint projects using Graph API while freelancing and predicting that this will be a good and easy way to program in future soon by all.

We will look at how to construct a REST Url for Graph for SharePoint site.{version}/{Resource}/{ODATA}

  • /version
    • v1
    • beta
  • Resource
    • Site
    • List
    • Select
    • Filter
    • expand

SharePoint Site Queries

Login to Graph Explorer from the link 

Type the query and click Run Query.

Below are some sample site Queries

  • Search for sites
  • Get Site ID. The Site ID contains hostname,SiteCollection ID and the Web ID
  • Read Site By ID
  • Read Site By Path
  • Read Site Pages

Comparison with SharePoint Rest Url

While working on old SharePoint REST, you would begin the SharePoint rest URL with the site link.

Example :

Graph SharePoint
Read Sites Only Create Sites also
Root Url : Root Url :
Select Items ?select=Title Select Items ?select=Title
Expanding ?expand=Author Expanding ?expand=Author


You learnt how to construct SharePoint Sites URL in Microsoft Graph:

  • Read Sites by ID
  • Read Sites by Path
  • Read the Pages in a Site



Views: 8.95K  | Categories: Development, Graph & Delve, SharePoint, Uncategorized
About The Author
- I love exploring SharePoint and talking about SharePoint. Few of my contributions can be viewed here