ESC
Type to search...

Sites.Selected

Export JSON
Export CSV
Copy URL
Print
ApplicationDelegated Read User Scope

Allow the application to access a subset of site collections without a signed in user. The specific site collections and the permissions granted will be configured in SharePoint Online.

Permission data: April 6, 2026 at 4:06 AM UTC
Delegated Access App-Only Access

Permission Details

Application Permission

Access selected site collections

Allow the application to access a subset of site collections without a signed in user. The specific site collections and the permissions granted will be configured in SharePoint Online.

Delegated Permission User consent allowed

Access selected Sites, on behalf of the signed-in user

Allow the application to access a subset of site collections on behalf of the signed-in user. The specific site collections and the permissions granted will be configured in SharePoint Online.

Properties

Microsoft Graph v1.0 mapped-docs

Properties is shown from stable Microsoft Graph v1.0 metadata.

Property Type Description
dataLocationCode string The geographic region code for where this site collection resides. Only present for multi-geo tenants. Read-only.
hostname string The hostname for the site collection. Read-only.
root [root][] If present, indicates that this is a root site collection in SharePoint. Read-only.
archivalDetails [siteArchivalDetails][] Represents whether the site collection is recently archived, fully archived, or reactivating. The possible values are: recentlyArchived, fullyArchived, reactivating, unknownFutureValue.
analytics object Analytics about the view activities that took place on this site.
columns columnDefinition collection The collection of column definitions reusable across lists under this site.
contentTypes contentType collection The collection of content types defined for this site.
createdBy object Identity of the user, device, or application that created the item. Read-only.
createdByUser object Identity of the user who created the item. Read-only.
createdDateTime date-time Date and time of item creation. Read-only.
description stringNullable Provides a user-visible description of the item. Optional.
displayName stringNullable The full title for the site. Read-only.
drive object The default drive (document library) for this site.
drives drive collection The collection of drives (document libraries) under this site.
error object

Showing 15 of 36 properties.

JSON Representation

Microsoft Graph v1.0 mapped-docs

JSON representation is shown from stable Microsoft Graph v1.0 metadata.

JSON representation
{
  "hostname": "contoso.sharepoint.com",
  "dataLocationCode": "EUR",
  "root": {
    "@odata.type": "microsoft.graph.root"
  },
  "archivalDetails": {
    "@odata.type": "microsoft.graph.siteArchivalDetails",
    "archiveStatus": "fullyArchived"
  }
}

Relationships

Microsoft Graph v1.0 mapped

Relationships is shown from stable Microsoft Graph v1.0 metadata.

Relationship Type Description
drive drive Default drive for the site.
drives drive collection Document libraries under the site.
lists list collection Lists under the site.
sites site collection Subsites under the site.
permissions permission collection Permissions associated with the site.
columns columnDefinition collection The collection of column definitions reusable across lists under this site.
contentTypes contentType collection The collection of content types defined for this site.
externalColumns columnDefinition collection Related externalColumns data exposed by this resource.
items baseItem collection Used to address any item contained in this site. This collection can't be enumerated.
operations richLongRunningOperation collection The collection of long-running operations on the site.
pages baseSitePage collection The collection of pages in the baseSitePages list in this site.
termStores termStore.store collection The collection of termStores under this site.
contentModels contentModel collection The collection of content models applied to this site.
documentProcessingJobs documentProcessingJob collection The document processing jobs running on this site.
extensions extension collection The collection of open extensions defined for this site. Nullable.
pageTemplates pageTemplate collection The collection of page templates on this site.

Graph Methods

Delegated access App-only access
Exact Microsoft Learn match

Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.

Methods
GET /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions
GET /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions/{documentSetVersionId}
POST /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions
POST /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions/{documentSetVersionId}/restore
DELETE /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions/{documentSetVersionId}
Exact Microsoft Learn match

Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.

Methods
GET /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions
GET /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions/{documentSetVersionId}
POST /drives/{drive-id}/items/{item-id}/permissions
POST /groups/{group-id}/drive/items/{item-id}/permissions
POST /me/drive/items/{item-id}/permissions
POST /sites/{siteId}/drive/items/{itemId}/permissions
POST /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions
POST /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions/{documentSetVersionId}/restore
POST /users/{userId}/drive/items/{itemId}/permissions
DELETE /sites/{site-id}/lists/{list-id}/items/{item-id}/{permissionId}
DELETE /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions/{documentSetVersionId}
Exact Microsoft Learn PowerShell match

Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.

Commands
Get-MgSiteListItemDocumentSetVersion /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions
List documentSetVersions
Get-MgSiteListItemDocumentSetVersion /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions/{documentSetVersionId}
Get documentSetVersion
New-MgSiteListItemDocumentSetVersion /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions
Create documentSetVersion
Remove-MgSiteListItemDocumentSetVersion /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions/{documentSetVersionId}
Delete documentSetVersion
Exact Microsoft Learn PowerShell match

Microsoft Graph PowerShell beta commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.

Commands
Get-MgBetaSiteListItemDocumentSetVersion /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions
List documentSetVersions
Get-MgBetaSiteListItemDocumentSetVersion /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions/{documentSetVersionId}
Get documentSetVersion
New-MgBetaDriveItemPermission /drives/{drive-id}/items/{item-id}/permissions
Create permission on a driveItem
New-MgBetaSiteListItemDocumentSetVersion /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions
Create documentSetVersion
Remove-MgBetaSiteListItemDocumentSetVersion /sites/{siteId}/lists/{listId}/items/{itemId}/documentSetVersions/{documentSetVersionId}
Delete documentSetVersion

Code Examples

C# / .NET SDK
Create documentSetVersion
// Code snippets are only available for the latest version. Current version is 5.x

// Dependencies
using Microsoft.Graph.Models;

var requestBody = new DocumentSetVersion
{
	Comment = "v1",
	ShouldCaptureMinorVersion = false,
};

// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Sites["{site-id}"].Lists["{list-id}"].Items["{listItem-id}"].DocumentSetVersions.PostAsync(requestBody);
JavaScript
Create documentSetVersion
const options = {
	authProvider,
};

const client = Client.init(options);

const documentSetVersion = {
  comment: 'v1',
  shouldCaptureMinorVersion: false
};

await client.api('/sites/root/lists/Documents/items/2/documentSetVersions')
	.post(documentSetVersion);
PowerShell
Create documentSetVersion
Import-Module Microsoft.Graph.Sites

$params = @{
	comment = "v1"
	shouldCaptureMinorVersion = $false
}

New-MgSiteListItemDocumentSetVersion -SiteId $siteId -ListId $listId -ListItemId $listItemId -BodyParameter $params
Python
Create documentSetVersion
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.document_set_version import DocumentSetVersion
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = DocumentSetVersion(
	comment = "v1",
	should_capture_minor_version = False,
)

result = await graph_client.sites.by_site_id('site-id').lists.by_list_id('list-id').items.by_list_item_id('listItem-id').document_set_versions.post(request_body)

App Registration

1

Navigate to Azure Portal

Go to App registrations in Microsoft Entra admin center

2

Add API Permission

Select your app → API permissions → Add a permission → Microsoft Graph

3

Select Permission Type

Choose Application permissions or delegated permissions and search for Sites.Selected

4

Grant Admin Consent

Application permissions always require admin consent.