Skip to main content

Microsoft OneDrive Component

Interact with files and drives inside your Microsoft OneDrive tenant

Component key: ms-onedrive

Description

Microsoft One Drive is a file hosting service that allows you to collaborate and share files with your team members.

Connections

OAuth 2.0

Triggers

Webhook

Receive and validate webhook requests from OneDrive for webhooks you configure. | key: webhook


Data Sources

Files in Directory

A picklist of files in a given directory | key: listFilesInDirectory | type: picklist


List Drives from Source

A picklist of drives for an account | key: listDrives | type: picklist


List Folders from Source

A picklist of folders in a given directory | key: listFolders | type: picklist


Actions

Create a Subscription

Create a Subscription to notify you of changes to a resource | key: createSubscription

Output Example Payload

{
"data": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#subscriptions/$entity",
"id": "38031b7d-16b1-448a-8e68-68b8aec62315",
"resource": "/me/drive/root",
"applicationId": "0fed8223-8c47-4c71-ba78-92c6f9448725",
"changeType": "updated",
"clientState": "client-specific string",
"notificationUrl": "https://hooks.prismatic.io/trigger/SW5z",
"notificationQueryOptions": null,
"lifecycleNotificationUrl": null,
"expirationDateTime": "2023-07-01T11:23:00Z",
"creatorId": "6219df3c-04d4-4b39-b2a4-ad162a5dcb8f",
"includeResourceData": null,
"latestSupportedTlsVersion": "v1_2",
"encryptionCertificate": null,
"encryptionCertificateId": null,
"notificationUrlAppId": null
}
}

Delete a Subscription

Delete a Subscription by ID | key: deleteSubscription

Output Example Payload

{
"data": ""
}

Delete all Instanced Subscriptions

Delete all existing subscriptions for this instance | key: deleteSubscriptions


Delete File

Delete the information and metadata of a file by path | key: deleteFile


Download File

Download a file from the current user's drive | key: downloadFile


Get Drive

Get the information and metadata of a drive | key: getDrive


Get Item

Returns the information and metadata of an existing item | key: getItemById


Get Item by Path

Get the information and metadata of an item with your path in Sharepoint | key: getItem


Get Site

Get the information and metadata of a given Site | key: getSite


List Changes

Track changes in a driveItem and its children over time. | key: listChanges


List Children

Returns all child elements on a given drive item | key: listChildren


List Drives By Group

Returns a list of all drives available to the given group | key: listDrivesByGroup


List Drives By Site

Returns a list of all drives available to the given site | key: listDrivesBySite


List Drives By User

Returns a list of all drives available to the given user | key: listDrivesByUser


List Files Shared With Me

Returns all files shared with your account | key: listSharedFiles

Output Example Payload

{
"data": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(driveItem)",
"value": [
{
"@odata.type": "#microsoft.graph.driveItem",
"createdDateTime": "2021-03-06T19:25:37.131Z",
"id": "EXAMPLE",
"lastModifiedDateTime": "2021-03-06T19:25:37.131Z",
"name": "My Document.docx",
"webUrl": "https://my-endpoint.sharepoint.com/personal/my_friend_email_com/_layouts/Doc.aspx?sourcedoc=%7B7847AF9A-D834-4899-BCFF-B53E6CB3EB8A%7D&file=Document%20-%20Copy.docx&action=default&mobileredirect=true",
"size": 10484,
"createdBy": {
"user": {
"email": "my_friend@email.com",
"displayName": "My Friend"
}
},
"lastModifiedBy": {
"user": {
"email": "my_friend@email.com",
"displayName": "My Friend"
}
},
"file": {
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
},
"fileSystemInfo": {
"createdDateTime": "2021-03-06T19:25:37.131Z",
"lastModifiedDateTime": "2021-03-06T19:25:37.131Z"
},
"remoteItem": {
"createdDateTime": "2021-03-06T19:25:37.131Z",
"id": "EXAMPLE",
"lastModifiedDateTime": "2021-03-06T19:25:37.131Z",
"name": "My Document.docx",
"size": 10484,
"webDavUrl": "https://my-endpoint.sharepoint.com/personal/my_friend_email_com/Documents/My%20Document.docx",
"webUrl": "https://my-endpoint.sharepoint.com/personal/my_friend_email_com/_layouts/Doc.aspx?sourcedoc=%7B7847AF9A-D834-4899-BCFF-B53E6CB3EB8A%7D&file=Document%20-%20Copy.docx&action=default&mobileredirect=true",
"createdBy": {
"user": {
"email": "my_friend@email.com",
"displayName": "My Friend"
}
},
"file": {
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
},
"fileSystemInfo": {
"createdDateTime": "2021-03-06T19:25:37.131Z",
"lastModifiedDateTime": "2021-03-06T19:25:37.131Z"
},
"lastModifiedBy": {
"user": {
"email": "my_friend@email.com",
"displayName": "My Friend"
}
},
"parentReference": {
"driveId": "EXAMPLE",
"driveType": "business",
"id": "EXAMPLE"
},
"shared": {
"scope": "users",
"sharedDateTime": "2021-03-06T19:25:37.131Z",
"sharedBy": {
"user": {
"email": "my_friend@email.com",
"displayName": "My Friend"
}
}
},
"sharepointIds": {
"listId": "00000000-00000000-00000000-00000000",
"listItemId": "3",
"listItemUniqueId": "00000000-00000000-00000000-00000000",
"siteId": "00000000-00000000-00000000-00000000",
"siteUrl": "https://my-endpoint.sharepoint.com/personal/my_friend_email_com",
"tenantId": "00000000-00000000-00000000-00000000",
"webId": "00000000-00000000-00000000-00000000"
}
}
}
]
}
}

List Groups

Returns a list of all groups the user has access to | key: listGroups


List Items In Directory

Returns a list of all items in the given directory | key: listDriveItems


List My Drives

Returns a list of all drives available to the current user | key: listDrives


List Shared

List shared items in SharePoint or OneDrive | key: listShared


List Sites

Returns a list of all sites available to the current user | key: listSites


List Subscriptions

List all available Subscriptions | key: listSubscriptions

Output Example Payload

{
"data": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#subscriptions",
"value": [
{
"id": "38031b7d-16b1-448a-8e68-68b8aec6df45",
"resource": "/me/drive/root",
"applicationId": "0fed8223-8c47-4c71-ba78-92c6f9441235",
"changeType": "updated",
"clientState": null,
"notificationUrl": "https://hooks.prismatic.io/trigger/SW5",
"notificationQueryOptions": null,
"lifecycleNotificationUrl": null,
"expirationDateTime": "2023-07-01T11:23:00Z",
"creatorId": "62162f3c-04d4-4b39-b2a4-ad891a5dcb8f",
"includeResourceData": null,
"latestSupportedTlsVersion": "v1_2",
"encryptionCertificate": null,
"encryptionCertificateId": null,
"notificationUrlAppId": null
}
]
}
}

Move File

Move the given file to a new location | key: moveFile


Raw Request

Send raw HTTP request to Microsoft Onedrive | key: rawRequest


Search Drive

Search the current drive for a string of text | key: searchDrive


Search Users

Find the information and metadata of an existing user | key: searchUser


Update File

Update the information and metadata of a given file | key: updateFile


Upload File

Upload a file to the user's connected drive | key: uploadFile