Access Personal SharePoint Site With Graph API

Access SharePoint site

To access a SharePoint site you need to know either the site id or the server-relative URL for a site.

GET /v1.0/sites/{site_id}
GET /v1.0/sites/{hostname}:/{server_relative_path}

Personal site

The personal site of any user within the tenant has the following URL:


User Personal SharePoint site URL

Get URL of personal site

The URL for the user's site is stored in the property mySite of the user resource.

You can't retrieve the URL for all users by one call

GET /v1.0/users?$select=id,mySite

You have to send a request for each user and specify mySite in $select query parameter that you want to read this property.

GET /v1.0/users/{user_id}?$select=id,mySite

Access personal site with server relative URL

With the knowledge of personal site's URL, you can create the request:

GET /v1.0/sites/

Find id of the personal site

Do you want to search for personal site? If yes, use /search/query endpoint

POST /v1.0/search/query

    "requests": [
            "entityTypes": [
            "query": {
                "queryString": "\"\""

Wrap the URL of the personal site into double quotes.

Buy Me a Coffee at
An error has occurred. This application may no longer respond until reloaded. Reload x