site resource type

Namespace: microsoft.graph


APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

The site resource provides metadata and relationships for a SharePoint site.


Method REST Path
Get root site GET /sites/root
Get site GET /sites/{site-id}
Get site by path GET /sites/{hostname}:/{site-path}
Get site for a group GET /groups/{group-id}/sites/root
Get analytics GET /sites/{site-id}/analytics
Get activities by interval GET /sites/{site-id}/getActivitiesByInterval
List pages GET /sites/{site-id}/pages
List root sites GET /sites?filter=root ne null&select=siteCollection,webUrl
Search for sites GET /sites?search={query}
Follow site POST /users/{user-id}/followedSites/add
Unfollow site POST /users/{user-id}/followedSites/remove
List followed sites GET /me/followedSites
Get permission GET /sites/{site-id}/permissions/{permission-id}
List permissions GET /sites/{site-id}/permissions
Create permissions POST /sites/{site-id}/permissions
Delete permission DELETE /sites/{site-id}/permissions/{permission-id}
Update permission PATCH /sites/{site-id}/permissions/{permission-id}
List content types GET /sites/{site-id}/contentTypes
Create contentType POST /sites/{site-id}/contentTypes
List columns GET /sites/{site-id}/columns
Create column POST /sites/{site-id}/columns
List operations GET /sites/{site-id}/operations
Get site settings GET /sites/{site-id}/settings


Property Type Description
id string The unique identifier of the item. Read-only.
createdDateTime DateTimeOffset The date and time the item was created. Read-only.
description string The descriptive text for the site.
eTag string ETag for the item. Read-only.
displayName string The full title for the site. Read-only.
lastModifiedDateTime DateTimeOffset The date and time the item was last modified. Read-only.
name string The name / title of the item.
root root If present, indicates that this is the root site in the site collection. Read-only.
settings siteSettings The settings on this site. Read-only.
sharepointIds sharepointIds Returns identifiers useful for SharePoint REST compatibility. Read-only.
siteCollection siteCollection Provides details about the site's site collection. Available only on the root site. Read-only.
webUrl string (url) URL that displays the item in the browser. Read-only.

id property

A site is identified by a unique ID that is a composite of the following values:

  • Site collection hostname (
  • Site collection unique ID (GUID)
  • Site unique ID (GUID)

The root identifier always references the root site for a given target, as follows:

  • /sites/root: The tenant root site.
  • /groups/{group-id}/sites/root: The group's team site.


Relationship Type Description
analytics itemAnalytics resource Analytics about the view activities that took place in this site.
columns Collection(columnDefinition) The collection of column definitions reusable across lists under this site.
contentTypes Collection(contentType) The collection of content types defined for this site.
drive drive The default drive (document library) for this site.
drives Collection(drive) The collection of drives (document libraries) under this site.
items Collection(baseItem) Used to address any item contained in this site. This collection cannot be enumerated.
lists Collection(list) The collection of lists under this site.
operations richLongRunningOperation collection The collection of long running operations for the site.
pages Collection(sitePage) The collection of pages in the SitePages list in this site.
permissions Collection(permission) The permissions associated with the site. Nullable.
sites Collection(site) The collection of the sub-sites under this site.
termStore The termStore under this site.
externalColumns Collection(columnDefinition) The collection of column definitions available in the site that are referenced from the sites in the parent hierarchy of the current site.

JSON representation

The following is a JSON representation of the resource.

The site resource is derived from baseItem and inherits properties from that resource.

  "displayName": "string",
  "id": "string",
  "root": { "@odata.type": "microsoft.graph.root" },
  "settings": { "@odata.type": "microsoft.graph.sitesettings" },
  "sharepointIds": { "@odata.type": "microsoft.graph.sharepointIds" },
  "siteCollection": {"@odata.type": "microsoft.graph.siteCollection"},

  /* relationships */
  "analytics": { "@odata.type": "microsoft.graph.itemAnalytics" },
  "columns": [ { "@odata.type": "microsoft.graph.columnDefinition" }],
  "contentTypes": [ { "@odata.type": "microsoft.graph.contentType" }],
  "externalColumns": [ { "@odata.type": "microsoft.graph.columnDefinition" }],
  "drive": { "@odata.type": "" },
  "drives": [ { "@odata.type": "" }],
  "items": [ { "@odata.type": "microsoft.graph.baseItem" }],
  "lists": [ { "@odata.type": "microsoft.graph.list" }],
  "permissions": [ { "@odata.type": "microsoft.graph.permission" }],
  "sites": [ { "@odata.type": ""} ],
  "termStore": { "@odata.type": "" },

  /* inherited from baseItem */
  "createdDateTime": "datetime",
  "description": "string",
  "eTag": "string",
  "lastModifiedDateTime": "datetime",
  "name": "string",
  "webUrl": "url"