---
title: "Get recently accessed OneDrive files"
method: GET
path: "/api/v1/onedrive/recent"
---

# Get recently accessed OneDrive files

`GET /api/v1/onedrive/recent`

## Request

- Base URL: `https://localhost:3000`
- URL: `https://localhost:3000/api/v1/onedrive/recent`
- Auth: OAuth 2 (authorization code, authorization URL `/oauth/authorize`, token URL `/oauth/token`)

Get files the user has recently accessed in OneDrive. Use when user asks 'my recent OneDrive files', 'what did I open recently in OneDrive'. **NOTE:** Requires Microsoft authentication via /oauth/microsoft/authorize.

## Query parameters

- `max_results` integer

## Response `200`

Recently accessed files

- OneDriveFilesResponse
  - `user` string
  - `files` OneDriveFile[]
    - `id` string: OneDrive file ID
    - `name` string: File name
    - `mimeType` string: MIME type of the file
    - `webUrl` string: Link to view the file in browser
    - `lastModifiedDateTime` string, date-time: Last modified timestamp
    - `size` integer: File size in bytes
    - `parentReference` object
      - `driveId` string
      - `id` string
      - `path` string
    - `folder` object: Present if item is a folder
      - `childCount` integer
  - `count` integer: Number of files in this page
  - `nextPageToken` string: Token to get next page (null if no more pages)
  - `hasMore` boolean: Whether more files are available

## Other responses

- `401`: Authentication required
- `500`: Internal server error
- `503`: OneDrive not authenticated. User must authenticate at /oauth/microsoft/authorize

---

[API](https://skmtc.dev/corpusiq/apis/multi-source-mcp-api.md) · [All operations](https://skmtc.dev/corpusiq/apis/multi-source-mcp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/corpusiq/apis/multi-source-mcp-api/revisions/e25648ba6027?raw)
