Microsoft OneDrive is a cloud storage service that lets users store, sync and share files across devices, with integration into Microsoft Office applications, secure backup and real-time collaboration. The UnifyApps Microsoft OneDrive connector uses the Microsoft Graph API to upload, download, search and organize files and folders, manage sharing permissions and file versions, read drive, user and group details, and react to new or changed files from workflows and agents.
This guide covers every authentication type available on the connection form, and the actions and triggers supported, along with the Microsoft Graph permission each one needs.
Authentication
Before you begin, you should have the following information:
Connection name: a descriptive name such as MyAppOneDriveIntegration, so the connection is easy to identify later.
Authentication type: select the type of authentication for connecting to your Microsoft OneDrive account:
OAuth 2.0 (Authorization)
OAuth 2.0 (Authorization) With Custom Credentials
OAuth 2.0 (Client Credentials)
The two OAuth 2.0 (Authorization) types act on behalf of the Microsoft user who signs in, using the delegated permissions you select in the required Scopes field (offline_access is always added so the connection can refresh its token). OAuth 2.0 (Client Credentials) is app-only: it requests https://graph.microsoft.com/.default, so the connection gets the application permissions granted to your app registration in Azure. If Tenant ID is left empty, common is used.
By default, Scopes has Sites.Read.All, Files.Read.All, Group.Read.All and offline_access selected. These cover the read actions and the New File, New Folder and New/updated file triggers. Add more scopes from the list if you use: Add permission, Add permission for site files, Create folder, Delete file or folder, Remove permission, Upload file from URL or Upload file via file content (Files.ReadWrite, or Files.ReadWrite.All for other users' drives and SharePoint); the two real-time triggers (Files.ReadWrite.All, also needed to remove their subscription); List users, Get user details from email or Fetch member groups for a user (User.Read.All); Fetch owned groups for a user (User.Read); or Fetch teams for a user (Team.ReadBasic.All). Keep Files.Read.All (or another Files read scope) selected, because Test Connection lists the root folder of your drive.
Every authentication type also shows optional Event Hub fields. Fill them in only if you use the real-time triggers; see Event Hubs delivery settings below.
1. OAuth 2.0 (Authorization)
Use this when you want to connect with your own Microsoft account and do not need to register an app.
Enter a Connection name.
Select OAuth 2.0 (Authorization) as the Authentication type.
Leave Tenant ID empty to use
common, or enter your tenant ID or domain to restrict sign-in to one organization (organizationsallows any work or school account,consumersonly personal Microsoft accounts).In Scopes, select the permissions for the actions you plan to use (the Delegated value in the tables below).
Leave Delegated scopes on, and optionally fill in the Event Hub fields.
Click Authorize. You are redirected to the Microsoft sign-in page.
Sign in with the Microsoft account whose OneDrive the connection should use.
Review the permissions requested on the consent screen and click Accept. Permissions such as
Files.Read.All,User.Read.AllandGroup.Read.Allmay need administrator consent in your organization.You are redirected back to UnifyApps with a confirmation that the account is connected.
2. OAuth 2.0 (Authorization) With Custom Credentials
Use this when your organization wants the connection to use its own Azure app registration while actions still run on behalf of a signed-in user.
Step 1: App registration in Azure
Log in to the Azure portal, search for App registrations and click New registration.
Enter a name and choose the supported account type, single tenant or multitenant.
Under Redirect URI, choose platform Web and paste the Callback URL shown on the connection form (it is copyable and differs per environment).
Click Register.
On the Overview tab, copy the Application (client) ID and the Directory (tenant) ID.
Go to API permissions → Add a permission → Microsoft Graph → Delegated permissions and add the permissions you will select in Scopes, plus
offline_accessso the connection can refresh its token. Click Grant admin consent if your tenant requires it.Go to Certificates & secrets → New client secret, add a description and expiry, and click Add. Copy the secret Value immediately and store it securely. It is not shown again.


Step 2: Connection setup in UnifyApps
Open Connections → New Connection → Microsoft OneDrive and enter a Connection name.
Select OAuth 2.0 (Authorization) With Custom Credentials as the Authentication type.
Enter the Client ID, Client Secret and Tenant ID copied from Azure.
In Scopes, select the same permissions you added to the app registration.
Leave Delegated scopes on, and optionally fill in the Event Hub fields.
Click Authorize, sign in with Microsoft and accept the consent screen.
Confirm the success message after the redirect back to UnifyApps.
3. OAuth 2.0 (Client Credentials)
Use this for app-only access that does not depend on a signed-in user, for example to work with the OneDrive of any user in your organization. The app acts as itself with application permissions.
Step 1: Register the app in Azure
Log in to the Azure portal, search for App registrations and click New registration.
Enter a name and supported account type, and click Register. No redirect URI is needed for this flow.
From Overview, copy the Application (client) ID and Directory (tenant) ID.
Go to API permissions → Add a permission → Microsoft Graph → Application permissions and add the permissions for the actions you plan to use (the Application value in the tables below), for example
Files.Read.AllorFiles.ReadWrite.All.Click Grant admin consent for your tenant. Application permissions always need administrator consent.
Go to Certificates & secrets → New client secret, add a description and expiry, and click Add. Copy the secret Value immediately and store it securely. It is not shown again.
Step 2: Create the connection in UnifyApps
Open Connections → New Connection → Microsoft OneDrive and enter a Connection name.
Select OAuth 2.0 (Client Credentials) as the Authentication type.
Enter the Client ID and Client Secret copied from Azure.
Enter your tenant ID (or primary domain) in Tenant ID. The field is optional, but this flow needs your actual tenant; the default
commonis meant for the sign-in based flows.Turn Delegated scopes off. It is on by default, and with it on the connection calls the signed-in user's drive (
/me), which an app-only token cannot use. With it off, actions that do not take a user ID work on the OneDrive of the UnifyApps user running the automation, matched by email address; the (for user) actions work on the user you specify.Optionally fill in the Event Hub fields.
Click Test Connection to validate the credentials (it lists the root folder of the drive), then click Create.
Event Hubs delivery settings (optional)
The real-time triggers, New/updated file (realtime, for user) and On file change (Event Hubs delivery), receive Microsoft Graph change notifications through Azure Event Hubs. Set this up once and enter the values on the connection.
In the Azure portal, click Create a resource, search for Event Hubs and create an Event Hubs namespace. In the namespace, select Event Hubs → + Event Hub and create an event hub.
In the namespace, open Access Control (IAM) → + Add → Add role assignment, select the Azure Event Hubs Data Sender role, add the Microsoft Graph Change Tracking service principal as a member and click Review + assign. This lets Microsoft Graph publish notifications to your event hub.
Open the event hub, go to Shared access policies → + Add, enter a name, select Listen and click Create. Open the policy and copy Connection string-primary key.
On the UnifyApps connection form, enter:
Event Hub Namespace: the namespace name, for example
contoso-ns.Event Hub Name: the event hub that receives the notifications.
Event Hub Consumer Group: leave empty to use
$Default.Event Hub Resource ID:
https://<namespace>.servicebus.windows.net/eventhubname/<event hub name>.Event Hub Tenant Domain: your tenant's primary domain, for example
contoso.com(shown in Microsoft Entra ID → Overview).Event Hub Listen Connection String: the connection string copied in step 3.
Leave Event Hub Decryption Private Key and Decryption Key Password empty. The connector's subscriptions send notifications without resource data, so nothing needs decrypting.
See Receive change notifications through Azure Event Hubs for details.
Actions
Scopes are Microsoft Graph permissions. A Delegated value applies to the two OAuth 2.0 (Authorization) types (select it in Scopes); an Application value applies to OAuth 2.0 (Client Credentials) (grant it on the app registration). A single value applies to both. Delegated only marks actions that Microsoft Graph supports with delegated permissions only. Files.Read and Files.ReadWrite cover only the signed-in user's own files; to work with files in other users' drives or in SharePoint, use Files.Read.All or Files.ReadWrite.All instead. Any broader permission also works.
Actions | Description | Scopes Required |
|---|---|---|
| Shares a file or folder in Microsoft OneDrive by adding a permission. | Delegated: Files.ReadWrite; Application: Files.ReadWrite.All |
| Shares a file in a SharePoint site's drive by adding a permission. | Files.ReadWrite.All (or Sites.ReadWrite.All) |
| Creates a folder in Microsoft OneDrive. | Delegated: Files.ReadWrite; Application: Files.ReadWrite.All |
| Deletes a file or folder in Microsoft OneDrive. | Delegated: Files.ReadWrite; Application: Files.ReadWrite.All |
| Downloads the contents of a file in Microsoft OneDrive. | Delegated: Files.Read; Application: Files.Read.All |
| Downloads a file by drive ID and item ID, including files outside the default drive such as SharePoint document libraries or hidden system folders. | Delegated: Files.Read; Application: Files.Read.All |
| Downloads the contents of a file from the specified user's OneDrive. | Files.Read.All |
| Downloads a specific version of a file from the specified user's OneDrive. | Files.Read.All |
| Fetches all Microsoft 365 groups, which have OneDrive access. | Group.ReadBasic.All (or Group.Read.All) |
| Fetches the IDs of all groups a user belongs to, directly or through nested groups. | User.ReadBasic.All and GroupMember.Read.All (or User.Read.All and Group.Read.All) |
| Fetches the IDs of all groups a user owns. | Delegated only: User.Read.All (or Directory.Read.All) |
| Fetches the permissions of files and folders in Microsoft OneDrive. | Delegated: Files.Read; Application: Files.Read.All |
| Fetches the permissions of a file or folder in the specified user's OneDrive. | Files.Read.All |
| Fetches the teams a user is a member of, by user ID. | Team.ReadBasic.All |
| Resolves a SharePoint site ID to its default drive ID and owner details. | Files.Read.All (or Sites.Read.All) |
| Resolves a user ID or UPN to the user's default OneDrive drive ID and owner details. Returns 404 if the user's OneDrive has never been provisioned. | Delegated: Files.Read; Application: Files.Read.All |
| Resolves a SharePoint list item's unique ID to its drive item. | Files.Read.All (or Sites.Read.All) |
| Fetches files and folders created, updated, moved or deleted in a drive, using the Microsoft Graph delta query. | Delegated: Files.Read; Application: Files.Read.All |
| Retrieves a file in Microsoft OneDrive, including its download URL. | Delegated: Files.Read; Application: Files.Read.All |
| Gets the metadata of a file in Microsoft OneDrive. | Delegated: Files.Read; Application: Files.Read.All |
| Gets the metadata of a file or folder in the specified user's OneDrive. | Files.Read.All |
| Counts the files and folders directly inside a OneDrive folder with a live read, without search-index lag. | Delegated: Files.Read; Application: Files.Read.All |
| Gets the count of file activities (access, edit, create, delete and more) on a drive item over the last 3 months. | Delegated: Files.Read; Application: Files.Read.All |
| Retrieves a drive item by its ID in Microsoft OneDrive. | Delegated: Files.Read; Application: Files.Read.All |
| Gets the ID of a SharePoint site from its host name and site name. | Sites.Read.All |
| Gets the details of a user by email address. | User.Read.All |
| Lists all drives available to the user in Microsoft OneDrive. | Delegated: Files.Read; Application: Files.Read.All |
| Lists all versions of a file in the specified user's OneDrive. | Files.Read.All |
| Lists files and folders in Microsoft OneDrive. | Delegated: Files.Read; Application: Files.Read.All |
| Lists files and folders in the specified user's OneDrive. | Files.Read.All |
| Lists the members of a group with OneDrive access. | GroupMember.ReadBasic.All (or Group.Read.All) |
| Lists the permissions of a file or folder in Microsoft OneDrive. | Delegated: Files.Read; Application: Files.Read.All |
| Lists recently used documents in Microsoft OneDrive. | Delegated only: Files.Read |
| Lists users with OneDrive access. | Delegated: User.ReadBasic.All (or User.Read.All); Application: User.Read.All |
| Removes a permission from a file or folder in Microsoft OneDrive. | Delegated: Files.ReadWrite; Application: Files.ReadWrite.All |
| Searches files and folders across OneDrive and SharePoint with Microsoft Search. | Files.Read.All (or Sites.Read.All) |
| Searches files in Microsoft OneDrive. | Delegated: Files.Read; Application: Files.Read.All |
| Uploads a file from a URL to Microsoft OneDrive. | Delegated: Files.ReadWrite; Application: Files.ReadWrite.All |
| Uploads a file from file content to Microsoft OneDrive. | Delegated: Files.ReadWrite; Application: Files.ReadWrite.All |
| Lists the files and folders other people have shared with the user in Microsoft OneDrive, together with who shared each one. | Delegated: Files.Read.All (Files.Read returns fewer details). Microsoft is retiring this API: it stops returning data after November 2026. |
Triggers
Triggers | Description | Scopes Required |
|---|---|---|
| Triggers when a new file is created in the selected folder in Microsoft OneDrive. | Delegated: Files.Read; Application: Files.Read.All |
| Triggers when a new folder is created in the selected folder in Microsoft OneDrive. | Delegated: Files.Read; Application: Files.Read.All |
| Triggers when a file is uploaded or updated in the selected folder in Microsoft OneDrive. | Delegated: Files.Read; Application: Files.Read.All |
| Triggers in real time when a file is uploaded or updated in the specified user's OneDrive, through a Microsoft Graph drive subscription. Can also deliver permission changes such as sharing and role updates. | Files.ReadWrite.All (Microsoft Graph requires it for drive subscriptions) |
| Triggers when a file is added, updated or deleted in the specified user's OneDrive, delivered through Azure Event Hubs. Deleted notifications carry only the item ID. | Files.ReadWrite.All (Microsoft Graph requires it for drive subscriptions) |