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 giorni gratis · senza carta · hosting UE
Chiedi qualsiasi cosa a OneDrive
Prova un prompt reale su OneDrive (Microsoft 365) via AnythingMCP — Claude chiama i tool e risponde. Premi Enter sul tuo messaggio per installare su Cloud.
Installa OneDrive su CloudClaude è un'AI e può sbagliare. Verifica sempre le risposte.
Setup in 2 minuti
- 1Avvia la trial gratuita su cloud.anythingmcp.com.
- 2Clicca OneDrive (Microsoft 365) nel connector store. Incolla le credenziali quando richiesto.
- 3Genera una MCP API key e punta il client AI all'URL MCP generato.
Guide per OneDrive
Setup passo-passo per i principali client AI.
Configurare OneDrive (Microsoft 365)
Direttamente dalla definizione del connettore: dove trovare le credenziali, quali permessi servono e con quale API parla questo adapter. Fornite in inglese dall'autore del connettore.
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)
- Open https://entra.microsoft.com (or https://portal.azure.com) → Applications → App registrations → New registration.
- 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_IDto the Directory (tenant) ID shown on the app's Overview page (a GUID), or to your domain such ascontoso.onmicrosoft.com. - Accounts in any organizational directory (multi-tenant): set
MICROSOFT_TENANT_IDtoorganizations. - ... and personal Microsoft accounts: set
MICROSOFT_TENANT_IDtocommon(work, school and personal accounts) orconsumers(personal accounts only). The value must match the app's account type, otherwise Microsoft refuses the sign-in (AADSTS50194 or AADSTS50020).
- Accounts in this organizational directory only (single tenant): only your organisation's users can sign in. Set
- Under Redirect URI pick platform Web and enter
https://cloud.anythingmcp.com/api/mcp-oauth/callbackon AnythingMCP Cloud, or<your AnythingMCP URL>/api/mcp-oauth/callbackwhen you host AnythingMCP yourself. It must match character for character (AADSTS50011 otherwise). - API permissions → Add a permission → Microsoft Graph → Delegated permissions: add
offline_access,User.Read,Files.ReadWrite. - 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.
- Paste the Application (client) ID into
MICROSOFT_CLIENT_ID, the secret value intoMICROSOFT_CLIENT_SECRET, the tenant value from step 2 intoMICROSOFT_TENANT_ID, and install. - 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(plusFiles.ReadWrite.Allfor workbooks in SharePoint or shared with the user) - SharePoint:
Sites.ReadWrite.AllandFiles.ReadWrite.AllEvery connector also needsoffline_accessandUser.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_filecreates 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). Withconflict_behaviorfail(default) an existing file is never overwritten;renamestores the new one asname 1.txt.onedrive_replace_file_contentoverwrites 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_itemis 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_itemmoves within the same OneDrive;onedrive_rename_itemrenames 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 (useonedrive_get_shared_item). - 409
nameAlreadyExists: an item with that name exists in the folder; pick another name orconflict_behaviorrename. - 423
resourceLocked: the file is open for editing or checked out. 507quotaLimitReached: 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).
La tua AI è a due click da OneDrive (Microsoft 365).
Installa il connettore, incolla le credenziali, chiedi all'AI. 7 giorni gratis, niente carta.