A terminal session reaching a personal OneDrive and two Microsoft 365 work tenants through a single Carly MCP server

Connect Multiple OneDrive Accounts to Claude Code

Add every OneDrive to Carly and one Claude Code session searches all of them at once. Authorize each Microsoft identity once, register a single MCP server, and the terminal works across your personal drive and every work tenant together.

Claude Code reaches OneDrive the way it reaches everything outside your repository: through the Model Context Protocol. The drive count is a property of the server you register, not a Claude Code setting, and every other route stops at one Microsoft identity.

1. Add your OneDrive accounts to Carly

  1. Sign in at carlyassistant.com.
  2. Open carlyassistant.com/integrations.
  3. Find OneDrive (Microsoft 365), click Connect, and authorize the account.
  4. Click Connect again for the next one, and keep going for as many accounts as you want.

Microsoft reuses the session your browser already holds, so sign out between authorizations or use a separate browser profile, and read the full address on the consent screen before you continue. Personal and work accounts share a sign-in box, and a contractor who lands on the same one twice ends up with a duplicate rather than a second drive.

On a managed tenant, an administrator may need to approve the connection. Each tenant decides separately, so two clients means two requests, both worth starting early. Each drive keeps its own authorization, and nothing is merged, copied, or synced between them.

Carly connects to thousands of apps, so while you are on that page you can add your inboxes, calendars, CRM, and anything else you want Claude Code to reach through the same server.

2. Register Carly as an MCP server

Carly is a remote HTTP server, so one command does it:

claude mcp add --transport http --scope user carly https://carlyassistant.com/mcp/

Anthropic’s Claude Code documentation describes three scopes. --scope user stores the server in ~/.claude.json and loads it in every project, which is what you want for files you reach from everywhere. Drop the flag and the entry lands in local scope, visible only in the directory where you added it. --scope project writes it into a committed .mcp.json for a team.

Then authenticate:

claude mcp login carly

That opens a browser for the OAuth flow. Sign in to the Carly workspace holding the drives. The /mcp panel inside a session runs the same flow, and --no-browser prints a URL instead.

Confirm the server is live:

claude mcp list

A healthy entry reads ✔ Connected. ! Needs authentication means the OAuth flow did not finish, and ✘ Failed to connect points at the URL or the network rather than your Carly account.

What one session can do across all your OneDrives

Prompts stop being per-account questions:

  • “Search all my OneDrives for the latest Adobe master services agreement and tell me which tenant each version lives in.”
  • “List everything added to my OneDrives in the last week and group it by account.”
  • “Open this OneDrive share link, read the workbook, and append a row for the Stripe invoice that landed yesterday.”
  • “Create a 2026-Q4 folder in each of my work drives and upload the signed Databricks order form into the right one.”

Carly lists OneDrive files, creates folders, uploads and downloads files, resolves share links, reads and appends rows to OneDrive workbooks, and shares items, on every connected account. Separation holds throughout: each Microsoft identity keeps its own permissions and its own authorization, and results say which drive a file came from.

The routes Claude Code already has to OneDrive

Three exist, and each one holds a single Microsoft identity.

The first is inherited rather than configured. Claude Code loads the connectors attached to your claude.ai account when you sign in with a subscription, so the Microsoft 365 connector turns up in the terminal without a line of MCP config. An issue on the Claude Code GitHub repository, filed about context bloat and since closed, put it plainly: every connector configured at the claude.ai account level is loaded into every CLI session once the login carries the user:mcp_servers scope. Anthropic’s help article on setting up that connector says it reads Word, Excel, PowerPoint, PDF, and plain-text files from SharePoint and OneDrive, that a Microsoft Entra Global Administrator must authorize the integration before anyone in the tenant can connect, and that personal Microsoft accounts such as @outlook.com and @hotmail.com addresses cannot be used to connect at all. For a contractor that is one work tenant plus a personal drive refused at the sign-in box.

The second is Microsoft’s own. Microsoft’s official MCP catalog on GitHub lists a remote OneDrive and SharePoint server, published under Agent 365 and documented on Microsoft Learn as a Work IQ server in preview. That documentation asks for a Microsoft 365 Copilot license, has an administrator activate or block the server from the Microsoft 365 admin center, and caps file upload and download at 5 MB. Its endpoint carries a tenant id in the path, so a second tenant is a second server with a second administrator in front of it.

The third is a community Microsoft Graph server, and the shape varies. Some are strictly single-tenant: one widely referenced OneDrive and SharePoint server wants a confidential Entra app registration with Files.ReadWrite.All and Sites.ReadWrite.All application permissions plus admin consent, and its README states the tenant must be a specific UUID rather than common. Others do carry several logins. The Softeria Microsoft 365 server documents multi-account support, at the cost of running your own server process, enabling work features with --org-mode from startup, and managing a local encrypted token cache. Its README also records the personal-account trap: set the tenant to consumers, because tokens issued through the common authority get rejected after refresh.

Underneath all three sits the same problem, and it is not the terminal. Consent is granted per tenant by a Global Administrator who is not you, so a contractor with a personal drive and two client tenants runs three separate consent chains, each revocable without notice. Tokens then expire, and reconnecting is not always the fix: an open issue on Anthropic’s connector repository reports the Microsoft 365 connector flashing “Connected” after a successful OAuth callback and reverting to “Reconnect”.

Per-tenant Graph servers versus Carly in Claude Code

NeedSelf-hosted Graph MCP serverCarly MCP server
Read one work OneDriveYesYes
Include a personal Microsoft accountVaries, and often a separate authority settingYes
Search several drives in one promptOne server or one account parameter per identityOne server, all accounts
Register an Entra app and hold a client secretUsually requiredNo
Add a third tenant laterNew registration and consentNo config change
Read and append OneDrive workbooksVaries by serverYes
Keep the work running with the terminal closedNoYes

Carly gives Claude Code one file toolset that covers every OneDrive you hold instead of a stack of tenant-specific applications. Carly offers free Zapier-style workflows; AI agents start at $35/month.

The part that outlives the session

A terminal session ends when you close it. The drive work does not: filing the signed contract against the right client, renaming exports to a convention, appending the week’s numbers to the tracking workbook.

That work belongs in a Carly workflow or a Carly agent, which runs with nothing open and no session attached. Carly watches each connected account individually, so a rule can fire on a file landing in one client’s drive and stay quiet on the personal one.

One wrinkle if you want Carly inside a Claude Code routine: routines run in the cloud against the connectors on your claude.ai account, and a server added locally with claude mcp add lives on your machine. Add Carly at claude.ai/customize/connectors as well, or declare it in a committed .mcp.json so it arrives with the cloned repository. Users have filed issues on the Claude Code GitHub repository about connectors not appearing in cloud routines and about claude.ai connectors being absent in -p runs, so check the routine sees the tools first. Routines also start from a schedule, a pull request, or an HTTP call, and every one needs a repository.

Rolling this out across a team with tenant-by-tenant review is available too: book a call.

Quick fixes when a drive does not appear

ProblemFix
Server shows ! Needs authenticationRun claude mcp login carly and finish the browser flow
Server missing in another projectRe-add with --scope user, or move the entry out of local scope
claude -p reports the tools are unavailableSign in interactively once with /mcp, then rerun the script
The same Microsoft account connected twiceRemove the duplicate, sign out of Microsoft, and reconnect the other identity
A work tenant blocks authorizationAsk that tenant’s Entra administrator to approve Carly
A file is missing from resultsConfirm it sits in that identity’s own drive rather than a SharePoint library shared into it

Frequently asked questions

Does Claude Code have a built-in OneDrive connector?

It inherits the Microsoft 365 connector you enable on claude.ai, and otherwise reaches OneDrive through MCP servers you register. Either way one Microsoft sign-in is attached, which is why several drives need a server that holds more than one.

Can this reach a personal OneDrive and a work one together?

Yes. Both are authorized separately inside Carly, and one Claude Code session works across all of them at once. Anthropic’s own Microsoft 365 connector is the route that rejects personal Microsoft accounts.

How many OneDrive accounts can this reach?

As many as you authorize in Carly. Claude Code talks to one server, so the account count is a Carly setting rather than a Claude Code one.

Do I need an Entra app registration?

Not for this route. Carly handles Microsoft authorization on the integrations page, so there is no app registration, no client secret, and no Copilot license to buy.

Will this work in a non-interactive run?

Yes, once you have signed in. Claude Code cannot run an OAuth flow mid-script, so complete claude mcp login carly from an interactive session first and the claude -p run inherits the stored token.


Related: Multiple Google Drive accounts in Claude Code · Multiple email accounts in Claude Code · Multiple Outlook accounts in Claude Code · Multiple OneDrive accounts in Claude · Claude Code MCP · Best AI assistants for OneDrive

Ready to automate your busywork?

Carly schedules, researches, and briefs you—so you can focus on what matters.

See what people say

"Before Carly, I relied on a Calendly link, but the whole process felt impersonal and not very professional. Carly changed that by handling all the back-and-forth, so I'm no longer stuck in endless email threads trying to line up schedules.

Now Carly reaches out to candidates, shares my real-time availability, lets them pick a slot, then sends a Zoom link and drops it straight into my calendar. She sends reminders to both of us before each call, which has significantly reduced no-shows and last-minute confusion.

On top of scheduling, Carly acts like a full executive assistant, sending me my schedule the night before so I can prepare for each call. It reminds me of the old x.ai assistant, but Carly is noticeably smarter, faster, and better suited to my healthcare recruitment business."

Gus Ibrahim, Founder & Director, IHR