get-drive-item
Retrieves metadata for a file or folder in a OneDrive drive, including name, size, last modified date, creator, web URL, file type, hashes, folder child count, and parent reference.
Instructions
All items contained in the drive. Read-only. Nullable.
💡 TIP: Gets metadata for a file or folder: name, size, lastModifiedDateTime, createdBy, webUrl, file (mimeType, hashes), folder (childCount), parentReference. Does not return content — use download-onedrive-file-content for that.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| select | No | Comma-separated fields to return, e.g. id,subject,from,receivedDateTime | |
| expand | No | Expand related entities | |
| driveId | Yes | Path parameter: driveId | |
| driveItemId | Yes | Path parameter: driveItemId | |
| fetchAllPages | No | Follow @odata.nextLink and merge up to 100 pages into one response. Can return enormous payloads—only when the user explicitly needs a full export. Prefer a small $top first, then paginate or narrow with $filter/$search. | |
| includeHeaders | No | Include response headers (including ETag) in the response metadata | |
| excludeResponse | No | Exclude the full response body and only return success or failure indication |