# Import From Microsoft OneDrive

> Import files or data from Microsoft OneDrive into Datahub.

The Import From Microsoft OneDrive node downloads files from Microsoft OneDrive into a dataflow. It uses Microsoft Graph APIs to securely access files and retrieve both file content and metadata, and supports importing either a single file or multiple files from a folder.

How it works:

1. Select a valid connection to Microsoft OneDrive.
2. Choose whether to import a File or a Folder.
3. Select the file or folder using the picker.
4. The node downloads the file(s).
5. The output contains one row per file, including metadata and file content.

## Configuration

| Setting | Required | Description |
| --- | --- | --- |
| Connection | Yes | A Microsoft Office 365 connection or an OAuth2 connection (Microsoft Graph). |
| Selection | Yes | Choose whether to import a File or a Folder. |
| File / Folder | Yes | Opens a picker to select a single file or a folder, depending on the Selection. |

### Selection types

**File**: downloads the selected file and outputs exactly one row.

**Folder**: retrieves all items in the selected folder, filters out subfolders, downloads each file individually, and outputs one row per file. Only files directly inside the selected folder are included: subfolders and their contents are not processed (non-recursive).

## Output

Each row represents a downloaded file:

| Column | Description |
| --- | --- |
| Id | OneDrive item ID of the file |
| FileName | Name of the file |
| Extension | File extension (e.g. `.pdf`) |
| Size | File size in bytes |
| File | The downloaded file |
| MimeType | MIME type (e.g. `application/pdf`) |
| Created | Creation date |
| Modified | Last modified date |
| CreatedBy | User who created the file |
| ModifiedBy | User who last modified the file |
| WebUrl | Direct OneDrive URL to the file |

## Tips

- Use Folder selection for batch processing multiple files.
- Be aware that folder import is not recursive.
- Ensure the connection has permission to read the selected files.
- Each file is fully downloaded and included in the File column.
- File availability depends on user permissions in OneDrive.