OneDrive (Microsoft 365)

OneDrive (Microsoft 365)

Let your AI work in OneDrive: browse and search files and folders, see details and who has access, create folders, upload and update text files, copy, rename and move. OneDrive for work or school and personal OneDrive through Microsoft Graph, signed in with your Microsoft account.

7 дней бесплатно · без карты · EU-хостинг

Спроси OneDrive что угодно

Попробуй реальный промпт против OneDrive (Microsoft 365) via AnythingMCP — Claude вызывает tools, возвращает ответ. Нажми Enter на своём сообщении, чтобы установить в Cloud.

Установить OneDrive в Cloud
OneDrive (Microsoft 365) · live via MCP
Поделиться
Opus 4.7

Claude — это AI, он может ошибаться. Проверяйте ответы.

Настройка за 2 минуты

  1. 1Запусти free trial на cloud.anythingmcp.com.
  2. 2Нажми OneDrive (Microsoft 365) в коннектор-сторе. Вставь учётные данные.
  3. 3Выпусти MCP API ключ и направьте AI-клиент на MCP URL.
Установить OneDrive (Microsoft 365) сейчас

Гиды по OneDrive

Пошаговая настройка для основных AI-клиентов.

Настройка OneDrive (Microsoft 365)

Прямо из определения коннектора: где взять учётные данные, какие права им нужны и с каким API работает этот адаптер. Предоставлено автором коннектора на английском языке.

OneDrive

This connector works with the signed-in user's OneDrive through Microsoft Graph v1.0 (https://graph.microsoft.com/v1.0, /me/drive): browse folders, find files, read details and who has access, create folders, upload and replace small text files, copy, rename and move. It works with OneDrive for work or school (Microsoft 365) and, depending on the app registration, with personal OneDrive. Everything runs as the user who authorized the connector: the AI sees and changes exactly what that user can.

Setup (one-time, about 10 minutes)

  1. Open https://entra.microsoft.com (or https://portal.azure.com) → Applications → App registrations → New registration.
  2. Name it (e.g. "AnythingMCP Microsoft 365") and choose the supported account types:
    • Accounts in this organizational directory only (single tenant): only your organisation's users can sign in. Set MICROSOFT_TENANT_ID to the Directory (tenant) ID shown on the app's Overview page (a GUID), or to your domain such as contoso.onmicrosoft.com.
    • Accounts in any organizational directory (multi-tenant): set MICROSOFT_TENANT_ID to organizations.
    • ... and personal Microsoft accounts: set MICROSOFT_TENANT_ID to common (work, school and personal accounts) or consumers (personal accounts only). The value must match the app's account type, otherwise Microsoft refuses the sign-in (AADSTS50194 or AADSTS50020).
  3. Under Redirect URI pick platform Web and enter https://cloud.anythingmcp.com/api/mcp-oauth/callback on AnythingMCP Cloud, or <your AnythingMCP URL>/api/mcp-oauth/callback when you host AnythingMCP yourself. It must match character for character (AADSTS50011 otherwise).
  4. API permissions → Add a permission → Microsoft Graph → Delegated permissions: add offline_access, User.Read, Files.ReadWrite.
  5. Certificates & secrets → New client secret. Copy the secret Value (not the Secret ID); it is shown once. Note its expiry date: when it expires the connector stops working until you paste a new one.
  6. Paste the Application (client) ID into MICROSOFT_CLIENT_ID, the secret value into MICROSOFT_CLIENT_SECRET, the tenant value from step 2 into MICROSOFT_TENANT_ID, and install.
  7. On the connector page click Authorize with Provider and sign in with the account whose OneDrive the AI should work with. The refresh token is stored encrypted and access tokens (about 1 hour) are renewed automatically.

One Entra app for all Microsoft connectors: the app registration made for the Outlook connector works here as well. Open it, add the delegated permissions from step 4 under API permissions, keep the same redirect URI, and reuse the same MICROSOFT_CLIENT_ID, MICROSOFT_CLIENT_SECRET and MICROSOFT_TENANT_ID. Each connector asks only for its own scopes when you authorize it. The permissions per connector:

  • Outlook: Mail.ReadWrite, Mail.Send, Calendars.ReadWrite
  • OneDrive: Files.ReadWrite
  • Excel: Files.ReadWrite (plus Files.ReadWrite.All for workbooks in SharePoint or shared with the user)
  • SharePoint: Sites.ReadWrite.All and Files.ReadWrite.All Every connector also needs offline_access and User.Read.

Admin consent: these delegated permissions normally do not need an administrator, but many organisations turn off user consent. If the sign-in shows "Need admin approval" (AADSTS65001 or AADSTS90094), a tenant administrator opens the app registration → API permissions → Grant admin consent for <organisation> once; afterwards every user can authorize. Each connector still works only with what the account that signed in may see.

Scopes: offline_access User.Read Files.ReadWrite. offline_access is what makes Microsoft issue a refresh token; without it the connector stops an hour after authorizing. Files.ReadWrite covers the user's own OneDrive. To open files that other people shared with the user, add Files.ReadWrite.All to the app registration and replace Files.ReadWrite with it in the connector's OAuth settings, then authorize again. For a read-only setup, use offline_access User.Read Files.Read (or Files.Read.All), authorize again, and disable onedrive_create_folder, onedrive_upload_text_file, onedrive_replace_file_content, onedrive_copy_item, onedrive_rename_item, onedrive_move_item.

Switched off at install: onedrive_delete_item, onedrive_create_sharing_link and onedrive_invite. Sharing gives other people access to the user's files, and a document the AI reads could ask it to share something, so turn these on per tool only if the AI should share or delete. Deleted items go to the OneDrive recycle bin and can be restored there.

Ids and paths: every file and folder has an id (in list and search results). The top folder is root. The _by_path tools take a path from the top of the OneDrive without a leading slash, e.g. Documents/Reports 2026; names containing #, % or ? cannot be addressed by path, use the id tools for them. parentReference names an item's folder (id, path) and drive (driveId).

Reading content: this connector does not download files. Graph answers a download with a redirect to the whole file and does not promise to honour a byte range, so a single large file could exhaust the server. Give the user the item's webUrl to open it. For cell values of Excel workbooks use the Microsoft Excel connector, which reads them through the workbook API.

Writing

  • onedrive_upload_text_file creates a text file in a folder in one call (up to about 4 MB); the extension decides the file type (.txt, .md, .csv, .json, .html, .xml). With conflict_behavior fail (default) an existing file is never overwritten; rename stores the new one as name 1.txt.
  • onedrive_replace_file_content overwrites an existing text file; the previous content stays in its version history. Office documents, PDFs and images cannot be created or edited here.
  • onedrive_copy_item is asynchronous: Graph accepts the request without a body and the copy appears in the target folder shortly after. It needs the target's drive id (onedrive_get_drive → id) and folder id.
  • onedrive_move_item moves within the same OneDrive; onedrive_rename_item renames in place.

Sharing: onedrive_list_permissions shows who has access and which sharing links exist. onedrive_create_sharing_link (switched off) makes a view or edit link for anonymous (anyone with the link, where the organisation allows it), organization or users. onedrive_invite (switched off) grants named people read or write access and can email them.

Search: onedrive_search searches names, metadata and content in the user's own OneDrive. onedrive_search_shared also returns files shared with the user; such hits carry remoteItem, which onedrive_get_shared_item opens. Graph's separate recent and shared with me lists are deprecated and stop returning data in November 2026, so this connector has no tools for them.

Pagination: list and search responses carry @odata.nextLink while more results exist. Call the same tool again with the same arguments and skip_token set to the $skiptoken (or skipToken) value in that link. top sets the page size.

Rate limits: Microsoft Graph throttles per user and per app. A throttled call answers 429 or 503 with Retry-After; wait and retry.

Common errors

  • 401 InvalidAuthenticationToken: the authorization was revoked or the client secret expired. Paste a new secret if needed and click Authorize with Provider again.
  • 403 accessDenied: a permission from step 4 is missing or was not consented, or the user may not change that item. A write on a read-only setup also ends here.
  • 404 itemNotFound: the id or path is wrong, the item was deleted, or it lives in another drive (use onedrive_get_shared_item).
  • 409 nameAlreadyExists: an item with that name exists in the folder; pick another name or conflict_behavior rename.
  • 423 resourceLocked: the file is open for editing or checked out. 507 quotaLimitReached: the OneDrive is full.
  • 400 invalidRequest: often a name with a character OneDrive does not allow (" * : < > ? / \ |).

Out of scope here: downloading file content, uploading binary files or files over 4 MB, restoring versions, emptying the recycle bin, other users' OneDrives and SharePoint document libraries (use the Microsoft SharePoint connector).

Твой AI в двух кликах от OneDrive (Microsoft 365).

Установи коннектор, вставь учётные данные, спроси AI. 7 дней бесплатно, без карты.