---
title: "Read a OneDrive text or binary file as the calling member"
method: GET
path: "/v1/capabilities/microsoft-365/drive-file/{itemId}"
tags: ["Capability Sources"]
---

# Read a OneDrive text or binary file as the calling member

`GET /v1/capabilities/microsoft-365/drive-file/{itemId}`

Returns OneDrive metadata and content using strict-UTF-8 content sniffing: text is returned regardless of MIME type, while binary files are returned as standard base64 up to 10 MiB. Folders and oversized files return metadata with an explicit contentUnavailableReason.

## Path parameters

- `itemId` string, required

## Response `200`

OneDrive file returned.

- Microsoft365DriveFileResponse
  - `ok` true, required
  - `file` object, required
    - `id` string, required
    - `name` string, required
    - `size` number, nullable, required
    - `modifiedTime` string, required
    - `webUrl` string, required
    - `mimeType` string, required
    - `kind` 'file' | 'folder' | 'unknown', required
    - `content` string, nullable, required
    - `contentBase64` string, nullable, required — Standard base64-encoded file bytes for binary files; decode locally.
    - `encoding` 'text' | 'base64' | 'none', required
    - `contentType` string, nullable, required
    - `truncated` boolean, required
    - `contentUnavailableReason` 'folder' | 'file_too_large', nullable, required

## Other responses

- `401` — The caller must be signed in.
- `409` — The calling member has not connected their Microsoft account or is missing permission.
- `502` — Microsoft Graph rejected the request.

---

[API](https://skmtc.net/openworklabs/apis/den-api.md) · [All operations](https://skmtc.net/openworklabs/apis/den-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openworklabs/den-api/versions/55ba7d5c7a7b/schema)
