> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Microsoft OneDrive connector

- Connector: `appmixer.microsoft.onedrive`
- Version: 1.6.0
- Components: 9 (1 trigger, 8 actions)

OneDrive is a file hosting service and synchronization service operated by Microsoft as part of its web version of Office.

- Connector page: <https://connectors.appmixer.com/connector/appmixer.microsoft.onedrive/1.6.0>
- Source code: <https://github.com/clientIO/appmixer-connectors/tree/dev/src/appmixer/microsoft/onedrive>
- Download package: <https://connectors.appmixer.com/connector/appmixer.microsoft.onedrive/1.6.0/download>

## Authentication

**Type:** OAuth 2

**Scopes:**

- `offline_access`
- `user.read`

## Triggers (1)

- [New File](https://connectors.appmixer.com/connector/appmixer.microsoft.onedrive/1.6.0/component/appmixer.microsoft.onedrive.NewFile.md) (`appmixer.microsoft.onedrive.NewFile`): This trigger fires every time there's a new file uploaded. It does not download the file! If you need the content of the file, use the ExportFile component. Additional scopes: `Files.ReadWrite.All`.

## Actions (8)

- [Create Folder](https://connectors.appmixer.com/connector/appmixer.microsoft.onedrive/1.6.0/component/appmixer.microsoft.onedrive.CreateFolder.md) (`appmixer.microsoft.onedrive.CreateFolder`): Create a folder in Microsoft OneDrive. Additional scopes: `Files.ReadWrite.All`.
- [Delete File Or Folder](https://connectors.appmixer.com/connector/appmixer.microsoft.onedrive/1.6.0/component/appmixer.microsoft.onedrive.DeleteFileOrFolder.md) (`appmixer.microsoft.onedrive.DeleteFileOrFolder`): Delete a file or folder in Microsoft OneDrive by its ID. A folder is deleted together with its content; deleted items go to the OneDrive recycle bin. Additional scopes: `Files.ReadWrite.All`.
- [Export File](https://connectors.appmixer.com/connector/appmixer.microsoft.onedrive/1.6.0/component/appmixer.microsoft.onedrive.ExportFile.md) (`appmixer.microsoft.onedrive.ExportFile`): Export file from Microsoft OneDrive. Additional scopes: `Files.ReadWrite.All`.
- [Get File](https://connectors.appmixer.com/connector/appmixer.microsoft.onedrive/1.6.0/component/appmixer.microsoft.onedrive.GetFile.md) (`appmixer.microsoft.onedrive.GetFile`): Returns the details of a child in a folder. Additional scopes: `Files.Read.All`.
- [List Files](https://connectors.appmixer.com/connector/appmixer.microsoft.onedrive/1.6.0/component/appmixer.microsoft.onedrive.ListFiles.md) (`appmixer.microsoft.onedrive.ListFiles`): List files in Microsoft OneDrive. Additional scopes: `Files.Read.All`.
- [Make Api Call](https://connectors.appmixer.com/connector/appmixer.microsoft.onedrive/1.6.0/component/appmixer.microsoft.onedrive.MakeApiCall.md) (`appmixer.microsoft.onedrive.MakeApiCall`): Generic method for making API calls to a 3rd party service. Additional scopes: `Files.ReadWrite.All`, `Sites.Read.All`.
- [Move File Or Folder](https://connectors.appmixer.com/connector/appmixer.microsoft.onedrive/1.6.0/component/appmixer.microsoft.onedrive.MoveFileOrFolder.md) (`appmixer.microsoft.onedrive.MoveFileOrFolder`): Move/Rename a file or folder in Microsoft OneDrive. Additional scopes: `Files.Read.All`.
- [Upload File](https://connectors.appmixer.com/connector/appmixer.microsoft.onedrive/1.6.0/component/appmixer.microsoft.onedrive.UploadFile.md) (`appmixer.microsoft.onedrive.UploadFile`): Upload file into Microsoft OneDrive. Additional scopes: `Files.ReadWrite.All`.

## Changelog

### 1.6.0

- New DeleteFileOrFolder component: deletes a file or folder (with its content) by ID in My Drive or a user, site, group or any drive.

### 1.5.1

- MakeApiCall: Request Headers and Query Parameters set in the Designer are now sent. They were silently dropped: the key-value field stores its rows as a JSON object string, which the component did not parse.

### 1.5.0

- NewFile: the delta backlog is now processed page by page with the resume link persisted after every page, so a redelivered notification or a late failure no longer replays the whole backlog.
- NewFile: the component lock is taken with an explicit TTL and extended before every Graph call, and at most 20 delta pages are processed per run - the rest continues on the next tick.
- NewFile: the webhook renewal in tick() no longer retries a contended lock 30 times, which used to throw 'LockError: Exceeded 30 attempts to lock the resource' every minute while a notification was being processed.
- All Microsoft Graph calls made through the legacy request helper now have a 30 s timeout so a hung call cannot hold a component lock indefinitely.
- NewFile: the 'created since' cutoff now advances to when the delta chain was started rather than when it was finished, so a file created while a backlog was being processed is no longer skipped, and recently emitted files are remembered so it does not fire twice. An expired delta link (410) is replaced by a fresh baseline, a transient failure is retried on the next tick, and the subscription renewal runs even when that retry fails.
- Output examples for every output field of CreateFolder, ExportFile, GetFile, ListDrives, ListGroups, ListSites, ListUsers, MoveFileOrFolder, NewFile and UploadFile.
- CreateFolder: a missing folder name is reported as a clear error instead of a failed Graph call.

### 1.4.0

- Added MakeApiCall component for performing arbitrary authorized API calls to the Microsoft Graph (OneDrive) API.

### 1.3.0

- Added test() (Flow Test Mode) to the NewFile trigger.

### 1.2.6

- The authentication flow now displays an account selection screen.

### 1.2.5

- Connection can now be created with custom tenant. To see the option while creating the connection, in the Admin -> Connector Configuration add configuration 'appmixer:microsoft' and inside it, add item 'microsoftTenant' and set its value to true.

### 1.2.4

- Fix for possible connection with empty label.

### 1.2.3

- Improved download file in ExportFile component.

### 1.2.1

- Added `redirectUri` to OneDrivePicker component.

### 1.2.0

- Configurable redirectUri param for the OneDrivePicker.

### 1.1.4

- GetFile, ListFiles, CreateFolder, MoveOrCreateFolder: handle user's permissions for dynamic inputs (userId, groupId, siteId, driveId).

### 1.1.3

- Added new components and updated input fields.

### 1.1.2

- Added groups and updated components.

### 1.1.1

- Fix output types on the ListFiles component.

### 1.1.0

- Upgraded OneDrive SDK and added new components.

### 1.0.3

- NewFile uses lock in tick method to update its state.

### 1.0.2

- NewFile recreates webhook if webhook gets deleted in OneDrive.
- NewFile uses locks to update its state.
- NewFile uses lock in tick method to update its state.

### 1.0.0

- Initial version
