Overview
Microsoft OneDrive is a cloud-based file storage and collaboration platform within the Microsoft 365 ecosystem. It is commonly used by businesses and teams to store documents, synchronize files across devices, manage sharing permissions, and collaborate on content through Microsoft applications such as Word, Excel, and PowerPoint.
The Microsoft OneDrive integration within the Wrk platform allows you to automate file-management workflows by calling the Microsoft Graph OneDrive API directly through prebuilt Wrk Actions.
This document provides an overview of how Microsoft OneDrive integrates into Wrk, how authentication works, general API behaviour, and a full list of available Wrk Actions.
Authentication
Microsoft OneDrive uses OAuth 2.0 authentication for secure access.
When connecting Xero via OAuth 2.0:
Create a new Microsoft OneDrive Connected Account in Wrk.
Sign in using your Microsoft 365 account.
Review and approve the requested permissions.
Select the OneDrive account or tenant Wrk should access.
Important Notes
Access tokens expire automatically and are refreshed by Wrk in the background.
Revoking permissions in Microsoft Entra ID or Microsoft 365 requires the account to be reauthenticated.
Organization-level conditional access policies may block authentication depending on tenant configuration.
General API Behaviour
Microsoft Graph API Overview
The OneDrive integration uses the Microsoft Graph REST API.
Most OneDrive resources are represented as DriveItem objects. Files, folders, and shared items generally contain:
id — unique identifier
name — file or folder name
parentReference — parent folder metadata
webUrl — browser-accessible URL
createdDateTime — creation timestamp
lastModifiedDateTime — last modification timestamp
Pagination
Large collection responses are paginated automatically.
Microsoft Graph returns an @odata.nextLink property when additional pages are available.
Example:
"@odata.nextLink": "https://graph.microsoft.com/v1.0/me/drive/root/children?$skiptoken=..."
To retrieve the next page of results, pass the provided nextLink URL into the subsequent request.
Important Notes
Pagination tokens are opaque and should not be modified.
Result sizes vary depending on endpoint and tenant configuration.
Large folders should always be retrieved using paginated requests.
Filtering and Query Parameters
Microsoft Graph supports several OData query parameters for filtering and shaping responses.
Common query parameters include:
$select— return only specified fields$filter— filter returned records$top— limit number of returned records$orderby— sort results$expand— inline related resources
Example:
?$select=id,name,size,lastModifiedDateTime
Available Wrk Actions for Microsoft 365OneDrive
Retrieve available drives from Microsoft 365 OneDrive
Retrieve current user's drive from Microsoft 365 OneDrive
Retrieve folder or file from Microsoft 365 OneDrive
Retrieve contents of a folder from Microsoft 365 OneDrive
Retrieve followed folders and files from Microsoft 365 OneDrive
Search drive from Microsoft 365 OneDrive
Create folder in Microsoft 365 OneDrive
Update folder or file in Microsoft 365 OneDrive
Copy folder or file in Microsoft 365 OneDrive
Delete folder or file in Microsoft 365 OneDrive
Follow folder or file in Microsoft 365 OneDrive
Additional Resources
Authentication Documentation: https://learn.microsoft.com/en-us/graph/auth/
Query Parameters: https://learn.microsoft.com/en-us/graph/query-parameters
Pagination Documentation: https://learn.microsoft.com/en-us/graph/paging
Delta Query Docs: https://learn.microsoft.com/en-us/graph/delta-query-overview
Throttling & Rate Limits: https://learn.microsoft.com/en-us/graph/throttling
