Organization Sites

The /Organizations/{organizationId}/Sites resource collection represents organization sites.

Get SharePoint Sites

Returns a collection of organization sites.

SecurityBearer
Request
path Parameters
organizationId
required
string <uuid>

Specifies the identification number of the Microsoft 365 organization. For more information on how to get this parameter, see Get Organizations.

query Parameters
limit
integer <int32>

Limits the maximum number of items that the server will return on a page. The maximum supported number of items per page is 10,000. The default value is 30.

offset
integer <int32>

Excludes from a response page the first N items of a collection resource. The default value is 0.

setId
string <uuid>

Specifies ID of a request sent earlier and stored in cache. Using the ID, you decrease the number of requests to the cloud.

includePersonalSites
boolean

Defines whether the personal sites are included to the resource representation that will be returned to the client. The following values are available:

  • true - the server returns properties of personal sites.
  • false - the server does not return properties of personal sites.
The default value is false.

parentId
string

Specifies what information the server will return in the resource representation. The following values are available:

  • <parentID> - ID of the SharePoint site. In the response, the server will return a representation of subsites for the specified top-level site.
  • root - specifies that the server will return a representation of all top-level SharePoint sites of the organization without their subsites.
If you do not specify this parameter, the server will return a representation of all top-level SharePoint sites with their subsites. Thus, the server will require longer time to execute the request.

locationFilter
string

Specifies an organization site location type.

Note: Use this parameter for organizations of the Hybrid type.

Enum: "Cloud" "OnPremises" "Any"
filter
string

Specifies a keyword to filter organization sites.

dataSource
string

Defines the representation of the organization sites that will be returned to the client. The following values are available:

  • PreferLocal. For Microsoft organizations with modern app-only authentication, data is returned from either the organization cache database if organization objects are already synchronized to this source, or directly from the organization if synchronization is in progress. For Microsoft organizations with modern authentication and legacy protocols or with basic authentication, data is returned directly from the organization.
  • Production. Data is returned directly from the organization.
  • PreferLocalResynced. For Microsoft organizations with modern app-only authentication, synchronization of objects with the organization cache database is started and upon synchronization completes, data is returned from the organization cache database. For Microsoft organizations with modern authentication and legacy protocols or with basic authentication, data is returned directly from the organization.
The default value is PreferLocal.

Enum: "PreferLocal" "Production" "PreferLocalResynced"
includeSearchSites
boolean

Defines whether the search sites are included to the resource representation that will be returned to the client. The following values are available:

  • true - the server returns properties of the search sites.
  • false - the server does not return properties of the search sites.
The default value is false.

Responses
200

OK

default

Operation failure response.

get/v8/Organizations/{organizationId}/Sites
Request samples
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "setId": "83e19bc1-5428-42b5-88ea-b28354e481f3",
  • "results": [
    ],
  • "_links": {
    }
}

Get SharePoint Site

Returns a resource representation of an organization site with the specified ID.

SecurityBearer
Request
path Parameters
organizationId
required
string <uuid>

Specifies the identification number of the Microsoft 365 organization. For more information on how to get this parameter, see Get Organizations.

siteId
required
string

Specifies the identification number of the SharePoint site. For more information on how to get this parameter, see Get SharePoint Sites.

query Parameters
dataSource
string

Defines the representation of the organization sites that will be returned to the client. The following values are available:

  • PreferLocal. For Microsoft organizations with modern app-only authentication, data is returned from either the organization cache database if organization objects are already synchronized to this source, or directly from the organization if synchronization is in progress. For Microsoft organizations with modern authentication and legacy protocols or with basic authentication, data is returned directly from the organization.
  • Production. Data is returned directly from the organization.
  • PreferLocalResynced. For Microsoft organizations with modern app-only authentication, synchronization of objects with the organization cache database is started and upon synchronization completes, data is returned from the organization cache database. For Microsoft organizations with modern authentication and legacy protocols or with basic authentication, data is returned directly from the organization.
The default value is PreferLocal.

Enum: "PreferLocal" "Production" "PreferLocalResynced"
Responses
200

OK

default

Operation failure response.

get/v8/Organizations/{organizationId}/Sites/{siteId}
Request samples
Response samples
application/json
{
  • "id": "string",
  • "eTag": 0,
  • "url": "string",
  • "parentUrl": "string",
  • "name": "string",
  • "isCloud": true,
  • "isPersonal": true,
  • "title": "string",
  • "isAvailable": true,
  • "siteCollectionError": "string",
  • "msid": "string",
  • "_links": {
    }
}

Document updated 12/18/2025

Page content applies to build 8.3.0.2201