Skip to main content
The Claude add-in for Microsoft 365 puts Claude in a task pane inside Excel, Word, PowerPoint, and Outlook. Point it at Portkey instead of Anthropic’s API and every request from every user routes through one governed gateway. Configuration travels in the add-in’s manifest XML, so nothing is left to individual users. Generate the manifest once, deploy it from M365 Admin Center, and the whole org is online. When you’re done:
  • Every task-pane conversation routes through Portkey
  • Model choice is pinned by config, not by the user
  • Budget caps, rate limits, and guardrails enforce on every request
  • Requests are attributed per user and team in Logs and Analytics

How it works

The add-in is hosted by Anthropic at pivot.claude.ai. You host nothing. The only artifact you produce is a manifest XML, and your gateway settings ride in it as URL query parameters on the task-pane URL.
Model traffic goes from the user’s Office WebView straight to Portkey. Allow pivot.claude.ai and your gateway host through the corporate firewall.

Prerequisites

1. Add a provider integration

Connect the upstream model source Portkey calls on your behalf. Go to Model CatalogAdd Provider.

Anthropic

Direct API access

AWS Bedrock

Cross-region inference

Vertex AI

Google Cloud platform

2. Create a config with override_params

The add-in sends Anthropic-API model names from its built-in model picker — claude-sonnet-4-5, claude-opus-4-5, and so on. Those names won’t resolve against your workspace’s provider slugs, so pin the target model with override_params. Go to ConfigsCreate Config:
The value uses @{provider-slug}/{model} addressing, where the slug is the integration from step 1.
Naming convention: m365-{team}-{env}. Examples: m365-finance-prod, m365-legal-prod.
override_params replaces the matching field in the incoming request. Whatever model the add-in’s picker sends is discarded, and every request is served by the model named here.
The model picker becomes cosmetic. Users switch models in the task pane and get identical behaviour. Collapse the picker to a single honest entry with available_models, or route on the incoming model name instead of hard-pinning it.
Configs also carry reliability features. Open the relevant section if you need them:
Route to a backup provider if the primary is unavailable:
See Fallbacks.
Reduce cost and latency for repeated prompts:
See Caching.
Send different teams to different models using metadata from step 4:
See Conditional Routing.

3. Create the API key

Go to API Keys → create one key per team or environment.
1

Attach the config from step 2

Every request authenticated with this key inherits the config.
2

Attach budget and rate limits

3

Turn on Allow config override

Required. Without it the attached config does not apply to the request.
Allow config override is not optional. Left off, Portkey keeps the client’s own parameters and passes the add-in’s claude-sonnet-4-5 straight through to the provider instead of replacing it with your override_params.model. The failure is quiet — a 200 from an unintended model, or a provider error about an unknown model, with nothing naming the config as the cause.

4. Verify the gateway before building anything

A manifest pointing at an unreachable model deploys perfectly and then fails at the user’s first message. Probe first.
Check two things in the response: If the response echoes claude-sonnet-4-5, the override isn’t applying. Re-check Allow config override on the API key.
Use authorization, not x-api-key. The add-in supports only those two header schemes, and Portkey rejects its API key on x-api-key with Invalid API Key. Error Code: 03. Portkey’s native x-portkey-api-key works with curl but the add-in cannot send it.

5. Install the manifest generator

The manifest is built by claude-for-msft-365-install, a Claude Code plugin published by Anthropic. It fetches the canonical manifest template and appends your gateway settings as URL query parameters.
1

Confirm Node.js is installed

The build and validation scripts run on Node 18+.
2

Add the marketplace and install the plugin

3

Restart the Claude Code session

Slash commands register at startup. Without a restart they won’t appear.
4

Set the plugin path

The plugin installs to a version-pinned directory:
Check your version with ls ~/.claude/plugins/cache/claude-for-financial-services/claude-for-msft-365-install/. Inside a session, ${CLAUDE_PLUGIN_ROOT} resolves automatically.
The plugin adds these commands: Update later with claude plugin update claude-for-msft-365-install@claude-for-financial-services, then restart.

Option A — guided wizard

Run the wizard and answer its prompts. It handles everything from provider choice through Admin Center upload:
The wizard appends every command and captured value to a setup log at ~/Desktop/claude-for-msft-365-install-setup.md. Re-running it resumes from that log instead of starting over.

Option B — generate directly

To skip the wizard, call the build script yourself. Excel, Word, and PowerPoint share one manifest. Outlook uses a different Microsoft schema and needs its own:

The four gateway keys

Single-quote the token in shell. Portkey keys contain / and +; the builder percent-encodes them correctly, but an unquoted shell mangles them first.
Validate before uploading:
Outlook needs Microsoft Graph admin consent before deployment, or every user hits “Need admin approval” on first open. Run /claude-for-msft-365-install:consent first. Note that Outlook does not support the Bedrock direct path.

Version and Id

First deploy: leave both alone. Updating an existing deployment: bump the fourth segment of <Version>. M365 Admin Center caches by <Id> + <Version> and silently ignores a re-upload at the same version — the most common cause of “I updated it but nothing changed”.

6. Test locally, then deploy

Sideload on one machine first. This bypasses the 24–72 hour Admin Center cache entirely, and a sideloaded manifest wins over a centrally deployed one with the same <Id>.
Fully quit and reopen Excel — a backgrounded app won’t rescan. The add-in appears under Insert → My Add-ins. Send a message and confirm the request lands in Logs. Remove a sideload with clear-addin-cache.sh --id <GUID> --apply. It’s dry-run by default and only ever touches that one ID.

Deploy the add-in for your organization

1

Open Integrated apps

Go to M365 Admin Center → Settings → Integrated apps and choose Upload custom apps.
2

Select the app type

App type: Office Add-in. Choose how to upload: Upload manifest file (.xml) from device, then select manifest.xml.Admin Center validates on upload — the same check as office-addin-manifest validate.
3

Assign users

Start with Just me or a pilot group. Widen to Entire organization once verified — assignment changes don’t require redeployment.Assign to Specific users/groups if per-user config was issued, matching exactly who was provisioned. Nested groups aren’t supported.
4

Accept permissions and finish

Review the requested permissions, then Finish deployment.
5

Repeat for Outlook

Upload manifest-outlook.xml as a separate app if Outlook was generated.
The add-in appears under Home → Add-ins in Excel, Word, and PowerPoint once it lands.
Propagation takes up to 24 hours for a fresh deploy and up to 72 hours for an update. To skip the update wait, redeploy with a fresh <Id> UUID — every client then treats it as a brand-new add-in.

Update the manifest

Rotating the Portkey key, changing the model list, or adding any config key means regenerating and re-uploading. Run the four commands in this order:

1. Regenerate with the new values

2. Bump the fourth version segment

3. Confirm the bump and validate

4. Re-upload in Admin Center → Integrated apps → your add-in → Update

The build script overwrites the file. It fetches the canonical template and writes it out fresh — it never reads your existing manifest.xml. Any hand-edit is discarded, including a <Version> bump, so always bump after regenerating, never before.
Hand-editing the manifest is otherwise fine, and those edits do reach users — trimming <Host> entries to drop PowerPoint, for example. Re-apply them after each regeneration, and bump <Version> regardless of how the change was made, or Admin Center serves the cached copy.
Keep <Id> unchanged so Admin Center treats this as an update to the existing add-in rather than a second, parallel installation.
To verify a change immediately instead of waiting out the cache, clear and re-sideload on one machine:
Fully quit and reopen the Office app — clearing does nothing until the app re-reads on launch, and a backgrounded app counts as still running.

Attribute requests per user and team

Add inference_headers to the manifest to tag every request with metadata Portkey uses for filtering, cost attribution, and conditional routing:
Authorization, x-api-key, Content-Type, Host, Content-Length, User-Agent, Cookie, and any anthropic-* / x-amz-* / x-goog-* header are reserved and silently dropped — they carry the add-in’s own auth and protocol negotiation.
For per-user metadata rather than one org-wide value, issue narrower keys per team, or serve per-user config from a bootstrap endpoint (/claude-for-msft-365-install:bootstrap).

Optional configuration

Each of these is another key=value argument to the build command.
Overrides the picker. Users see exactly what’s listed, in order, and nothing else. List every model that should remain, not just additions.
Set this to a single entry when the step 2 config pins one model, so the picker tells the truth.
JSON array of MCP servers the add-in connects to directly. headers present means static auth; absent triggers OAuth discovery. Values interpolate other config keys.
See MCP Gateway.
Comma-separated slugs in {domain}.{action} form:Pair web_search with mcp_servers to substitute an in-network search tool. Unknown slugs are ignored.
By default users skip the connection form and land straight in chat. Set auto_connect=0 to show the form prefilled instead.The Back button to Claude.ai sign-in is hidden whenever enterprise config is present. Set allow_1p=1 to keep it.
Routes the add-in’s OpenTelemetry traces to a collector you operate. Set the base HTTPS URL; the add-in appends /v1/traces and posts OTLP/HTTP. gRPC isn’t supported — the add-in runs in a browser WebView.Portkey also exports traces natively. See OpenTelemetry.

Security

The gateway_token in a manifest is a shared secret distributed to every user. It sits in plaintext in the task-pane URL, readable from any installed machine’s add-in cache. Don’t commit a manifest containing a live key to git.
Mitigate at the Portkey layer rather than trying to hide the key:
  • Scope each key narrowly with its own config, budget cap, and rate limit
  • Issue one key per team so revocation and rotation are surgical
  • Rotate on a schedule — regenerating the manifest is one command
For per-user tokens instead of one shared key, serve them from a bootstrap endpoint (/claude-for-msft-365-install:bootstrap), which returns per-user JSON config at startup and overrides manifest values.

Pre-launch checklist

1

Requests appear in Logs

Send a test message from the task pane. Confirm it shows in Logs with the expected metadata.
2

The correct model responds

Check the model field in the log entry. It should match the step 2 config, not the add-in’s picker.
3

Policies trigger

Test each budget cap, rate limit, and guardrail you configured.
4

Cost attribution is accurate

Verify spend rolls up under the right team in Analytics.
5

Firewall allows both hosts

pivot.claude.ai for the add-in payload, and your gateway host for model traffic.

Troubleshooting

The config isn’t applying. Confirm Allow config override is on for the API key (step 3) and that a config is attached to it.
Wrong header scheme. The add-in must use gateway_auth_header=authorization; Portkey rejects its key on x-api-key. Re-run the step 4 probe.
Two caches. Admin Center ignores re-uploads at the same <Version> — bump the fourth segment. Then the client Wef cache holds until the app restarts; clear it with clear-addin-cache.sh --id <GUID> --apply and fully quit Office. Service-side propagation takes up to 72 hours for updates.
Check Admin Center → Integrated apps → Users tab. Nested groups aren’t supported. If it shows under My Add-ins but has no ribbon button, the manifest’s <Hosts> is missing that app — check both the top-level <Hosts> list and the one under <VersionOverrides>.
The error screen has a Copy error details button. The paste shows a Request: block and a Manifest params: block with identical key names — diff them. Matching values mean the manifest went through unchanged and the problem is upstream. Raw error: is ground truth.
macOS: quit the app, run defaults write com.microsoft.Excel OfficeWebAddinDeveloperExtras -bool true, enable Safari’s developer features, then enable your terminal under System Settings → Privacy & Security → Developer Tools. That third gate is the one everyone misses. Right-click in the task pane → Inspect Element.Windows: right-click in the task pane → Inspect. No setup needed with WebView2.
Chat history, skills, and MCP registrations live in browser storage on the user’s own machine — there is no server-side copy. On Windows the widely circulated “delete the Wef folder” fix destroys them along with the manifest cache. Export first with /claude-for-msft-365-install:export-data.

Claude Desktop

Roll out Claude Desktop across your org

Claude Code

Route Claude Code through Portkey

Configs

Routing, fallbacks, and caching

Portkey is now PRISMA AIRS AI Gateway. See it in action.

Contact Us
Last modified on August 31, 2026