Anthropic documents four connection paths for the Office add-ins: LLM gateway, Bedrock direct, Vertex AI direct, and Foundry direct. This guide covers the LLM gateway path only. Read the Anthropic third-party platforms guide first. It is the source of truth for tenant setup, network allowlists, and feature support.
Who this guide is for
Two roles complete this setup:- An IT administrator deploys the add-in and runs the gateway. Sections 1 to 8 are for this role.
- An end user connects the add-in in their Office application. The End-user connection section is for this role.
What you set up
The add-in talks to a gateway that you run. The gateway is the Prem Confidential Proxy. The proxy encrypts each request before it leaves your network. The Prem enclave decrypts the request, runs the model, and encrypts the response. The add-in and the proxy host read plaintext. The Prem API Gateway sees only ciphertext. The Prem Enclave reads plaintext inside its Trusted Execution Environment (TEE).What this integration does
Users open the Claude task pane in these applications:- Excel
- PowerPoint
- Word
- Outlook
What this integration does not do
This setup does not do these things:- It does not set up Microsoft Copilot.
- It does not protect the full Microsoft 365 workflow. It protects the model request only.
- It does not make a Prem model behave the same as a Claude model.
- It does not protect Microsoft Graph calls, connectors, or local add-in storage.
- It does not enable work across applications. Anthropic lists this feature as unavailable through third-party platforms.
Before you start
Get these items ready:- Microsoft 365 with Microsoft Entra ID for admin consent.
- Claude for Excel, PowerPoint, Word, or Outlook, installed from Microsoft AppSource or by admin deployment.
- A gateway hostname that every approved device can reach.
- A TLS certificate that those devices trust. For a local pilot on macOS, you create one with mkcert.
- Docker Desktop for a local pilot on macOS, or Node.js for a server.
- A dedicated Prem API key.
- A 32-byte KEK encoded as 64 hexadecimal characters.
- The current Prem gateway and enclave endpoints.
- A Prem model that supports your workflow.
For Outlook, a Global Administrator grants Microsoft Graph consent one time. The Graph token stays in the user’s Outlook client. It never reaches your gateway or Prem. See the Anthropic Outlook guide for the consent step.
1. Choose the gateway hostname
The add-in cannot uselocalhost or 127.0.0.1 on macOS. So the gateway needs a real hostname.
- Choose a hostname, for example
prem-office-gateway.example.com. - Point it at the gateway host’s network IP address, not
127.0.0.1. - Add the hostname to your local DNS, or to the
/etc/hostsfile on each approved device. - Confirm that every approved device can resolve the hostname.
2. Create a trusted certificate
The task pane runs in a browser. It requires an HTTPS gateway with a trusted certificate. For a local pilot on macOS, create the certificate with mkcert:mkcert -install adds a local certificate authority to the Mac’s trust store. mkcert then writes two files in the current folder:
mkcert -CAROOT.
For a wider rollout, use an organization-issued or public certificate instead. Keep the private key safe. Do not commit it to a repository.
3. Set the gateway secrets
Set these values on the gateway host:4. Start the gateway
The gateway software is theconfidential-proxy command in the @premai/api-sdk npm package. The package is an end-to-end encrypted client that speaks both the OpenAI and the Anthropic API formats.
Local pilot on macOS (Docker): run the proxy in a container. Run this command from the folder that holds your certificate files:
https://prem-office-gateway.example.com:8787. The options mean:
--compat anthropicmakes the proxy speak the Anthropic Messages API. The add-in uses this format.--default-modelis built for the Claude for Microsoft 365 integration. It replaces the literalclauderequest value with a Prem model. Changeglm-5.2to the Prem model you want.--cors-originlets the task pane read the responses. The task pane loads fromhttps://pivot.claude.ai.
5. Restrict network access
Do not expose an unauthenticated proxy to the public internet. Allow inbound traffic to port8787 only from approved networks or your reverse proxy. Choose a topology that fits the rollout:
For an internet-reachable deployment, put an authenticated gateway in front of the proxy. Apply request limits, authentication, and alerts there.
6. Deploy the add-in
Anthropic provides a setup wizard for tenant deployment. The wizard generates the add-in manifest and handles admin consent. Install the plugin in your shell:- Gateway URL: the base URL of your proxy, for example
https://prem-office-gateway.example.com:8787. - Gateway token: the dedicated Prem API key.
manifest.xml file. For Outlook, it also writes manifest-outlook.xml.
Upload each manifest in the Microsoft 365 Admin Center. Open Settings → Integrated apps → Upload custom apps. Assign the add-in to a pilot group first. Widen the assignment after the pilot passes.
By default, the add-in sends the token in the
x-api-key header. To use Authorization: Bearer instead, set gateway_auth_header: authorization in the manifest. See the Anthropic gateway requirements for all manifest options.End-user connection
Give these steps to each user. They connect the add-in one time.- Open Excel, PowerPoint, Word, or Outlook.
- Launch the Claude add-in.
- On the sign-in screen, select Cloud provider or gateway.
- Select Gateway.
- Enter the gateway URL, for example
https://prem-office-gateway.example.com:8787. - Enter the Prem API key as the token.
- Select Connect.
/v1/messages to the URL.
The add-in stores the token in the browser’s local storage, inside its sandboxed frame. To change the token later, open Settings in the add-in sidebar, enter the new value, and test the connection.
Validate the rollout
Test each approved application on its own. Use non-sensitive test files first.- Open a small range, slide, paragraph, or email.
- Ask for a short model response.
- Apply one reversible edit through the add-in.
- Confirm that streaming finishes.
- Confirm that the Prem usage record appears.
- Confirm that an invalid token returns
401. - Confirm that an unapproved user or network cannot reach the gateway.
- Confirm that a certificate error blocks the connection.
Responsibility boundaries
Security boundary
Anthropic states that prompts and responses go only to your gateway. The add-in loads its interface and telemetry from Anthropic and Microsoft domains. That traffic does not carry prompts or responses.
Operational controls
Apply these controls for a managed rollout:- Pin the
@premai/api-sdkpackage version. - Run the proxy as a supervised service.
- Monitor certificate expiry and endpoint health.
- Rotate the Prem API key and KEK under a written procedure.
- Turn off debug logs in production unless support needs them.
- Keep document content out of support bundles.
- Record add-in assignments, gateway changes, and key rotations.
- Test rollback before each package or manifest update.
Troubleshooting
The add-in reports connection refused
The add-in reports connection refused
Check DNS, firewall rules, gateway health, and TLS trust. Confirm the base URL. Do not include
/v1/messages.The browser reports a CORS error
The browser reports a CORS error
Confirm the response includes the allowed origin on
OPTIONS, GET, POST, and error responses.The add-in reports no models
The add-in reports no models
Test
GET /v1/models with the same token. Confirm the Prem API key can list an enabled model.The request uses an unknown Claude model
The request uses an unknown Claude model
Send
claude as the model, or send a supported Prem model ID. The default substitution matches only claude.The token expired or was rotated
The token expired or was rotated
Update the token in the add-in Settings. Test the connection again.
Streaming hangs
Streaming hangs
Confirm that firewalls and reverse proxies do not buffer Server-Sent Events. Test the direct gateway path.
Frequently asked questions
Is this Microsoft Copilot?
No. This connects Anthropic’s Claude add-ins for Microsoft 365 to the Prem gateway.Does Prem run a Claude model in this setup?
Not always. The add-in uses the Anthropic API format. The proxy maps theclaude placeholder to a Prem model.
Why can the add-in not use localhost on macOS?
The add-in runs in a sandboxed browser frame. It cannot use the loopback path. Use a reachable gateway host with trusted TLS.Does CORS protect the API key?
No. CORS controls which browser origin can read responses. Authentication, TLS, device controls, and firewall rules protect access.Where does the add-in store the token?
The add-in stores the token in browserlocalStorage, inside its sandboxed task pane. Treat the device and browser profile as key-bearing assets.
Does this protect the full document lifecycle?
No. It protects the model request after the proxy encrypts it. Microsoft 365 and local add-in processing stay separate.Does work across Microsoft 365 applications work through this gateway?
No. Anthropic lists this feature as unavailable through third-party platforms. Check the limitation before each rollout.Related
Anthropic third-party platforms
Read Anthropic’s source guide for tenant setup and feature support.
Anthropic-compatible clients
Understand the Messages adapter and its compatibility limits.
Confidential Proxy
Review every proxy option and daemon control.
Security Model
Review the protected and unprotected parts of the data path.
Production Checklist
Complete key, attestation, reliability, and support checks.
Platform Status
Review current behavior and the untested tenant boundary.

