How to Connect Multiple OneDrive Accounts to Codex
Codex ships no OneDrive connector at all, so reaching a personal Microsoft account and two work tenants from one session is a question of which MCP server you register, and Carly is the one that holds them all. Authorize each Microsoft identity in Carly, register one server, and the Codex CLI can search or act in whichever drive you name. Carly holds your Google Drive accounts, and every mailbox and calendar on both sides, in the same place.
What one chat can do afterwards
- Search a personal Microsoft drive and two work tenants in the same question.
- Say which account each copy of a document lives in.
- Upload, move, share or delete a file in the drive you name.
- Add a fourth tenant without a new sign-in ritual or a config edit.
- Reach the drives from the IDE extension, the CLI and the desktop app alike.
- Act when the file lands in the client folder, with no session open.
Nothing is merged. Each Microsoft identity keeps its own authorization, and every drive stays individually addressable.
Three different Microsoft things get confused here
Sort these before you start, because search results mix them freely.
- Work IQ OneDrive, Microsoft’s own OneDrive MCP server inside Agent 365. Real, in preview, unreachable from Codex.
- The ChatGPT SharePoint and OneDrive connector, which lives on the ChatGPT side and never reads your local Codex config.
- An MCP server you register yourself, the path that actually works in the Codex CLI.
Codex has no Microsoft connector, and we checked it properly
OpenAI’s Codex documentation index carries no OneDrive, SharePoint or Microsoft entry at all. That absence is meaningful rather than a search failure: the same index lists third-party pages for GitHub, Linear and Slack, so the probe finds things when they exist. OpenAI’s plugins documentation names Codex Security, Gmail, Google Drive and Slack, plus GitHub as a connector. No Microsoft storage anywhere in it.
Since July 9, 2026 apps ship inside "plugins," listed in one directory spanning ChatGPT and Codex. Existing connections kept working and nothing needed resubmitting; what changed is the packaging and the storefront, not the protocol.
OpenAI does state plainly that plugins are unavailable in the IDE extension, and that installing one means using the ChatGPT desktop app or the Codex CLI. MCP servers are the wider cut, read by all three surfaces.
Microsoft’s own OneDrive MCP server is walled off from Codex
It exists. Microsoft documents a Work IQ OneDrive server with a tenant-scoped URL and tools covering listing, search, metadata, reads and writes, folder creation, rename, delete, share and sensitivity labels.
Two lines decide the matter. Microsoft says you can get started with Work IQ MCP tools “by using any one of these supported clients: Microsoft 365 admin center, Microsoft Copilot Studio, Microsoft Foundry,” and that “you must have a Microsoft 365 Copilot license to use Work IQ MCP servers.” Codex is not on the client list. Setup also wants Global Administrator privileges, a one-time tenant service-principal script and an admin-consented permissions step, and it covers work or school tenants only, with every file operation capped at 5 MB.
1. Give each OneDrive account a role
For example, all fictional:
| Address | Role |
|---|---|
fictional.iris.hoffman@outlook.com | Personal |
fictional.iris.hoffman@datadog.com | Main Company |
fictional.iris.hoffman@cloudflare.com | Client |
Use the role in ordinary queries and the full address before anything that changes a drive.
2. Connect each Microsoft account to Carly
- Sign in at carlyassistant.com.
- Open carlyassistant.com/integrations.
- Find OneDrive and click Connect.
- Sign in to the first Microsoft identity and approve access.
- Confirm the connected address in Carly.
Repeat for every additional identity, using a private window if Microsoft preselects the previous login. Personal Outlook.com accounts and Microsoft 365 work accounts connect the same way, and each tenant approves independently, so one company’s administrator declining does not block the others.
3. Register Carly as an MCP server
The CLI route is the shortest:
codex mcp add carly --url https://carlyassistant.com/mcp/
Servers added this way land in ~/.codex/config.toml at user scope. The hand-written equivalent:
[mcp_servers.carly]
url = "https://carlyassistant.com/mcp/"
default_tools_approval_mode = "writes"
A url key is what makes this a streamable HTTP server; a command key would make it stdio. There is no transport field to set in Codex, and adding one is a mistake rather than a hint. The approval mode is worth setting from the start: reads run, and anything that changes a drive stops for confirmation.
Then authenticate:
codex mcp login carly
That opens the browser OAuth flow. Sign in to the Carly workspace holding the drives. Codex supports OAuth and bearer tokens against remote HTTP MCP servers, so no secret sits in a config file. A trusted project can keep its own .codex/config.toml if you would rather scope the server to one repository. Verify with:
codex mcp list
4. Test each drive read-only before anything writes
Start a new session so the tools load, then one account per prompt:
In
fictional.iris.hoffman@outlook.com, list the ten most recently modified files at the root of the drive. Do not change anything.
In
fictional.iris.hoffman@cloudflare.com, search OneDrive for files matching “SOC 2 evidence” and name the account each result came from.
Then the question a per-account setup cannot answer in one pass:
Find every version of the Databricks statement of work across all three drives, tell me which is newest, and say which account each copy lives in.
If no tools appear, start a fresh session. Codex loads a newly registered server’s tools at session start rather than mid-session.
5. Name the account on every write
Treat
fictional.iris.hoffman@outlook.comas Personal,fictional.iris.hoffman@datadog.comas Main Company andfictional.iris.hoffman@cloudflare.comas Client. State the target account before any upload, move, delete or share, and never write to an account I have not named.
Then per action:
Upload the build report to the Q3 folder in the Datadog example account only.
Create a view-only share link for that file, in the Cloudflare example account, and show me the link before sending it anywhere.
Leave approvals on while you are learning the routing. A coding agent holding delete and share rights on two employers’ drives has earned a confirmation step.
The community server route, and what it costs
For completeness, there is a generic Graph-backed community server, @softeria/ms-365-mcp-server, which maps hundreds of tools one-to-one onto Microsoft Graph endpoints and does support several signed-in accounts, injecting an account parameter into every tool once more than one is cached. Its README never mentions Codex, so compatibility is an inference rather than a vendor promise.
What it costs is worth knowing before you choose it. Every account needs its own device-code sign-in at the terminal, and every tenant’s own user-consent policy decides whether you self-consent or bounce to an administrator. A cross-drive question becomes a fan-out of per-account calls rather than one request. Node, an npx fetch on first launch and a startup_timeout_sec you will end up raising all sit in the path. And it watches nothing, which is the next section.
Nothing fires when a file lands, and one thing looks like it does
MCP servers wait to be asked. The protocol has no scheduler and no event mechanism — its maintainers acknowledge that change detection today means polling — so an MCP connection can answer a question but cannot notice something on its own.
The Triggers and Events working group charter is dated March 2026 and its events item is still at the ideating stage with no champion assigned, so this is not a next-release matter.
Here is the trap. Graph-backed servers expose create-subscription, list-subscriptions and get-drive-delta, and those names read like triggers. They are not. A Graph subscription pushes to a publicly reachable notification URL you have to run yourself, and nothing delivers into a Codex session. delta is a poll you initiate. The file-triggered half of the job runs on Carly’s side.
One related myth: the sandbox does not gate MCP. Codex’s sandbox_workspace_write.network_access setting governs outbound network access for code and shell commands, and MCP is absent from the sandboxing documentation entirely, so do not turn network access on hoping to fix a server that will not load.
Codex versus Carly on OneDrive
| Need | Codex alone | Carly MCP server |
|---|---|---|
| Reach one OneDrive account | Only via a server you register | Yes |
| Hold several personal accounts and tenants | Not natively | Yes, one connection each |
| Read, write, delete, share files | Depends on the server | Yes |
| Answer one question across two drives at once | A sequence of per-account calls | One request |
| Setup cost per extra account | A terminal sign-in and a consent prompt | A Connect click |
| Act when a file arrives or changes | No, nothing watches | Yes |
| Run when nothing is open | No, you are at the keyboard | Yes |
Carly authorizes each Microsoft identity as its own connection, so one question spans a personal drive and two tenants without a per-account fan-out, and its workflows start from the event: the file lands in the client folder, gets read, filed and logged, and the right person hears about it with no terminal open. Carly reaches roughly 260 apps natively and anything else with a public API through your own key, so the drive is rarely the only step in the chain.
Free Zapier-style workflows; AI agents from $35/month. Connect the accounts at carlyassistant.com/integrations, then point Codex at carlyassistant.com/mcp.
Quick fixes
| Problem | Fix |
|---|---|
No tools appear after codex mcp add | Start a new Codex session; tools load at session start |
codex mcp login carly never completes | Finish the browser OAuth flow, then rerun codex mcp list |
| Codex rejected the config | Remove any type key. Codex selects stdio from command and streamable HTTP from url |
| A tenant blocks the sign-in | That tenant restricts user consent; ask its Microsoft 365 administrator to approve |
| Codex writes to the wrong drive | Use the full address in the prompt and require the account name in every answer |
| Microsoft connected the same drive twice | Remove the duplicate and reconnect from a private window |
| You expected MCP in Codex cloud | MCP works on the surfaces running on your machine; OpenAI’s MCP page does not cover cloud |
Frequently asked questions
Does Codex have a native OneDrive integration?
No. OpenAI’s Codex documentation index lists no OneDrive, SharePoint or Microsoft connector, while it does carry third-party pages for GitHub, Linear and Slack. Codex reaches OneDrive through an MCP server you register yourself.
How many OneDrive accounts can Codex reach?
As many as you authorize in Carly. Codex connects to one server, so the account count is a Carly setting rather than a Codex one, and personal Microsoft accounts and work tenants mix freely.
Will an administrator have to approve this?
Sometimes, and it depends on the tenant rather than on the permission. Microsoft’s Graph reference lists delegated Files.Read and Files.ReadWrite as not requiring admin consent, but each tenant sets its own user-consent policy and decides separately, so one blocked client does not affect the others.
Can Codex notice when a file lands in OneDrive?
No. Graph subscription and delta tools are not triggers: a subscription pushes to a public notification URL you would have to host, and delta is a poll you start. Nothing arrives in a Codex session on its own, which is why the watching half runs in a Carly workflow.
Why not use Microsoft’s official OneDrive MCP server?
Because Codex is not a supported client for it. Microsoft lists the Microsoft 365 admin center, Copilot Studio and Foundry, requires a Microsoft 365 Copilot license, and caps file operations at 5 MB in the current preview.
Related: Codex MCP servers · Multiple Outlook accounts in Codex · Multiple Outlook calendars in Codex · Multiple OneDrive accounts in ChatGPT · MCP servers · Best AI assistants for multiple Microsoft accounts · OneDrive integration
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."


