v1

latestOpenAPI 3.0.42026-07-1778875788.7 KB
drives.driveItem

Invoke action createLink

Create a link to share a driveItem driveItem. The createLink action creates a new sharing link if the specified link type doesn't already exist for the calling application. If a sharing link of the specified type already exists for the app, the existing sharing link is returned. DriveItem resources inherit sharing permissions from their ancestors.

post/drives/{driveId}/items/{driveItemId}/microsoft.graph.createLink

Path parameters

driveIdstring required

The unique identifier of drive

driveItemIdstring required

The unique identifier of driveItem

Request body

typestring nullable
scopestring nullable
expirationDateTimestring date-time nullable
passwordstring nullable
messagestring nullable
retainInheritedPermissionsboolean nullable
sendNotificationboolean nullable

Response

Success

idstring

The unique identifier for an entity. Read-only.

expirationDateTimestring date-time nullable

A format of yyyy-MM-ddTHH:mm:ssZ of DateTimeOffset indicates the expiration time of the permission. DateTime.MinValue indicates there's no expiration set for this permission. Optional.

hasPasswordboolean nullable

Indicates whether the password is set for this permission. This property only appears in the response. Optional. Read-only. For OneDrive Personal only..

rolesstring[]

The type of permission, for example, read. See below for the full list of roles. Read-only.

shareIdstring nullable

A unique token that can be used to access this shared item via the shares API. Read-only.