---
title: "Invoke action invite"
method: POST
path: "/drives/{driveId}/root/microsoft.graph.invite"
tags: ["drives.driveItem"]
---

# Invoke action invite

`POST /drives/{driveId}/root/microsoft.graph.invite`

Sends a sharing invitation for a driveItem.
A sharing invitation provides permissions to the recipients and optionally sends them an email with a sharing link.

## Path parameters

- `driveId` string, required

## Request body

- DriveItemIdMicrosoftGraphInviteBody
  - `requireSignIn` boolean, nullable
  - `roles` string[]
  - `sendInvitation` boolean, nullable
  - `message` string, nullable
  - `recipients` DriveRecipient[]
    - `alias` string, nullable — The alias of the domain object, for cases where an email address is unavailable (for example, security groups).
    - `email` string, nullable — The email address for the recipient, if the recipient has an associated email address.
    - `objectId` string, nullable — The unique identifier for the recipient in the directory.
  - `retainInheritedPermissions` boolean, nullable
  - `expirationDateTime` string, nullable
  - `password` string, nullable

## Response `2XX`

Success

- CollectionOfPermission
  - `value` Permission[]
    - `id` string — The unique identifier for an entity. Read-only.
    - `expirationDateTime` string, 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.
    - `grantedTo` IdentitySet
      - `application` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `device` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `user` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
    - `grantedToIdentities` IdentitySet[] — For type permissions, the details of the users to whom permission was granted. Read-only.
      - `application` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `device` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `user` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
    - `grantedToIdentitiesV2` SharePointIdentitySet[] — For link type permissions, the details of the users to whom permission was granted. Read-only.
      - `application` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `device` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `user` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `group` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `siteGroup` SharePointIdentity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
        - `loginName` string, nullable — The sign in name of the SharePoint identity.
      - `siteUser` SharePointIdentity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
        - `loginName` string, nullable — The sign in name of the SharePoint identity.
    - `grantedToV2` SharePointIdentitySet
      - `application` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `device` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `user` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `group` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `siteGroup` SharePointIdentity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
        - `loginName` string, nullable — The sign in name of the SharePoint identity.
      - `siteUser` SharePointIdentity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
        - `loginName` string, nullable — The sign in name of the SharePoint identity.
    - `hasPassword` boolean, nullable — Indicates whether the password is set for this permission. This property only appears in the response. Optional. Read-only. For OneDrive Personal only..
    - `inheritedFrom` ItemReference
      - `driveId` string, nullable — Unique identifier of the drive instance that contains the driveItem. Only returned if the item is located in a drive. Read-only.
      - `driveType` string, nullable — Identifies the type of drive. Only returned if the item is located in a drive. See drive resource for values.
      - `id` string, nullable — Unique identifier of the driveItem in the drive or a listItem in a list. Read-only.
      - `name` string, nullable — The name of the item being referenced. Read-only.
      - `path` string, nullable — Percent-encoded path that can be used to navigate to the item. Read-only.
      - `shareId` string, nullable — A unique identifier for a shared resource that can be accessed via the Shares API.
      - `sharepointIds` SharepointIds
        - `listId` string, nullable — The unique identifier (guid) for the item's list in SharePoint.
        - `listItemId` string, nullable — An integer identifier for the item within the containing list.
        - `listItemUniqueId` string, nullable — The unique identifier (guid) for the item within OneDrive for Business or a SharePoint site.
        - `siteId` string, nullable — The unique identifier (guid) for the item's site collection (SPSite).
        - `siteUrl` string, nullable — The SharePoint URL for the site that contains the item.
        - `tenantId` string, nullable — The unique identifier (guid) for the tenancy.
        - `webId` string, nullable — The unique identifier (guid) for the item's site (SPWeb).
      - `siteId` string, nullable — For OneDrive for Business and SharePoint, this property represents the ID of the site that contains the parent document library of the driveItem resource or the parent list of the listItem resource. The value is the same as the id property of that site resource. It is an opaque string that consists of three identifiers of the site. For OneDrive, this property is not populated.
    - `invitation` SharingInvitation
      - `email` string, nullable — The email address provided for the recipient of the sharing invitation. Read-only.
      - `invitedBy` IdentitySet
        - `application` Identity
          - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
          - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
        - `device` Identity
          - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
          - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
        - `user` Identity
          - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
          - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `redeemedBy` string, nullable
      - `signInRequired` boolean, nullable — If true the recipient of the invitation needs to sign in in order to access the shared item. Read-only.
    - `link` SharingLink
      - `application` Identity
        - `displayName` string, nullable — The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        - `id` string, nullable — Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      - `preventsDownload` boolean, nullable — If true then the user can only use this link to view the item on the web, and cannot use it to download the contents of the item. Only for OneDrive for Business and SharePoint.
      - `scope` string, nullable — The scope of the link represented by this permission. Value anonymous indicates the link is usable by anyone, organization indicates the link is only usable for users signed into the same tenant.
      - `type` string, nullable — The type of the link created.
      - `webHtml` string, nullable — For embed links, this property contains the HTML code for an <iframe> element that will embed the item in a webpage.
      - `webUrl` string, nullable — A URL that opens the item in the browser on the OneDrive website.
    - `roles` string[] — The type of permission, for example, read. See below for the full list of roles. Read-only.
    - `shareId` string, nullable — A unique token that can be used to access this shared item via the shares API. Read-only.
  - `@odata.nextLink` string, nullable

## Other responses

- `default` — error

---

[API](https://skmtc.net/ballerina-platform/apis/files.md) · [All operations](https://skmtc.net/ballerina-platform/apis/files/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ballerina-platform/files/versions/c34150e97737/schema)
