---
title: "Get user's OneDrive storage/quota"
method: GET
path: "/api/v1/onedrive/stats"
---

# Get user's OneDrive storage/quota

`GET /api/v1/onedrive/stats`

## Request

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

AUTHORITATIVE source for the user's CURRENT Microsoft OneDrive storage usage. Returns LIVE data: total quota, used space, remaining space. Call this whenever user asks about 'my OneDrive size', 'my Microsoft storage', 'OneDrive quota', or 'OneDrive space'. **NOTE:** If you get a 503 error, the user needs to authenticate with Microsoft at /oauth/microsoft/authorize first.

## Response `200`

LIVE storage stats from user's OneDrive

- OneDriveStatsResponse
  - `user` string: User email
  - `storage` object
    - `total` integer: Total storage quota in bytes
    - `used` integer: Storage used in bytes
    - `remaining` integer: Storage remaining in bytes
    - `deleted` integer: Storage used by deleted items in bytes
    - `state` string: Quota state (normal, nearing, critical, exceeded)
  - `owner` object
    - `displayName` string
    - `email` string
  - `_meta` object
    - `source` string
    - `authoritative` boolean

## 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)
