Skip to content
Context docs
Administer

Sign-in setups

A connector has to prove to the service that it’s allowed in. This page shows what to fill in for each choice under Sign-in on the Install connector page, or on the connector’s Settings tab later.

API key

Use this when the service gives you a key or token. Pick API key, then under Credentials choose whether everyone shares one key (paste it in Shared key) or each person adds their own the first time they use it.

Most services expect the key as Authorization: Bearer <key>, which is the default. If the service’s docs name a different header, open More options and change Header and Prefix (see API key header and prefix).

Signed request

Use this for a service that checks a signature on each request instead of a key. Pick Signed request, enter the header the service reads under Signature header, and paste the shared secret as you would a key.

Under Signed content, Method, path and body is safer than The body alone if the service supports it.

Each person signs in with their own account

Pick OAuth app when agents should act as each person, with that person’s own access in the service. You register an app with the sign-in provider once, and each person then signs in with their own account.

Some services (Notion, Linear, Asana) need no app at all: paste their address and Context sets up the sign-in itself; see Connect an MCP server by URL.

1. Register an app with the provider

In the provider’s admin site, create an app (often called an “app registration” or “OAuth client”). Give it this redirect address: your Context address followed by /api/auth/connector-oauth/callback. The install page shows it with a Copy button under Redirect URI.

Then copy the app’s client ID and client secret.

2. Fill in the install page

  1. Under Sign-in, pick OAuth app, then your provider: Microsoft Entra, Google, Okta, Other OIDC or Custom OAuth 2.0.
  2. Fill in what the provider asks for (see the table below), then paste the Client ID and Client secret.
  3. Open Scopes and add what the service needs. Scopes are the permissions you ask for, such as https://graph.microsoft.com/Mail.Read. The usual sign-in scopes are already there.
  4. Click Install and sign in, then Sign in to <name> and sign in once.

That first sign-in checks the whole setup and connects your own account. Until it works, the connector shows Needs setup and nobody else can connect.

ProviderWhat it asks for
Microsoft EntraTenant ID or domain: your Directory (tenant) ID. See Microsoft services.
GoogleNothing extra.
OktaOkta domain, such as example.okta.com.
Other OIDCIssuer or discovery URL, from the provider’s docs.
Custom OAuth 2.0The sign-in addresses, by hand. See Custom OAuth 2.0.

Google

Create an OAuth client ID of type Web application in Google Cloud Console with the redirect address above. Then, so people stay signed in, open Edit config → Authentication → Advanced → Extra authorize parameters and add access_type = offline and prompt = consent.

While Google’s consent screen is still in Testing, people are signed out every seven days. Publish the app to stop that.

Okta

The Okta choice uses your Okta org’s default sign-in server. If you use a custom one, pick Other OIDC and paste its discovery address instead.

Other OIDC

Paste the provider’s issuer or discovery address, and the page fills in the rest. Add offline_access to the scopes if your provider needs it to keep people signed in.

Custom OAuth 2.0

For providers that don’t publish their sign-in settings. Fill in Authorize URL and Token URL, then choose an Identity source so Context knows who signed in: a signed token (Issuer and JWKS URL) or a user-info address (Userinfo URL).

No scopes are added for you here, so add every scope the service needs.

Microsoft services

Azure DevOps, Microsoft Graph and Dynamics 365 all sign in through Microsoft Entra. The setup is the same for each; only the permissions and scopes differ.

Add one connector per Microsoft service. A sign-in for one Microsoft service is refused by the others. All your Microsoft connectors can share one app registration.

Register the app in Microsoft Entra

  1. New registration

    In the Microsoft Entra admin center, go to App registrations → New registration. Choose Accounts in this organizational directory only, and add a Web redirect URI: your Context address followed by /api/auth/connector-oauth/callback. The install page shows it with a Copy button.

  2. Copy the IDs

    From Overview, copy the Application (client) ID and the Directory (tenant) ID. The tenant ID looks like 00000000-0000-0000-0000-000000000000.

  3. Create a client secret

    Under Certificates & secrets, click New client secret and copy its Value right away (not the Secret ID). Note when it expires: on that date sign-ins stop until you paste a new one.

  4. Add permissions

    Under API permissions, add the service’s Delegated permissions, so agents act as the signed-in person. Also add Microsoft Graph → offline_access so people stay signed in.

  5. Click Grant admin consent. Without it, each person is asked to approve the app, or is blocked if your organization doesn’t allow that.

Add the connector

Under Sign-in, pick OAuth app, then Microsoft Entra. Paste the tenant ID, client ID and client secret, and add the service’s scope (below) to Scopes.

Use the tenant ID, not a domain. The field accepts a domain such as example.onmicrosoft.com, or common, but sign-in then fails at the last step with an issuer error. Only the Directory (tenant) ID works.

Azure DevOps

Use the scope https://mcp.dev.azure.com/.default. The full steps, including a one-time setup in your Microsoft tenant, are on the Azure DevOps page.

Microsoft Graph (mail, calendar, files, Teams)

Add an HTTP API connector with Base address https://graph.microsoft.com/v1.0, and import its tools from Microsoft’s OpenAPI file: https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/openapi/v1.0/openapi.yaml. The file is very large, so import only what agents need (for example only reading tools).

Add the matching Microsoft Graph → Delegated permissions in Entra (for example Mail.Read), and the same names as scopes on the connector. File uploads and downloads are limited to 4 MiB per call.

Dynamics 365

Dynamics 365 doesn’t publish an OpenAPI file, so you make one once and host it yourself. Add the Dynamics CRM → user_impersonation permission in Entra; each person also needs a Dynamics user with a security role.

  1. Download the API description

    Signed in with the Azure CLI as a Dynamics user:

    TerminalCode
    ORG=https://<your-org>.crm.dynamics.com TOKEN=$(az account get-access-token --resource "$ORG" --query accessToken -o tsv) curl -sS -H "Authorization: Bearer $TOKEN" "$ORG/api/data/v9.2/\$metadata" -o dataverse.xml
  2. Convert it to OpenAPI

    TerminalCode
    dotnet tool install --global Microsoft.OpenApi.Hidi hidi transform --csdl dataverse.xml --output dataverse.yaml --format yaml --version 3.0

    Check that the file’s servers entry is https://<your-org>.crm.dynamics.com/api/data/v9.2.

  3. Host it and import

    Put dataverse.yaml at an https:// address Context can reach, with no redirects. Add an HTTP API connector with that Base address, import from the file, and add the scope https://<your-org>.crm.dynamics.com/user_impersonation.

Reading data is the best-tested path. Try writes on a test environment first.

Staying signed in

Context keeps each person signed in by renewing their access when an agent uses the connector. If renewing fails, the chat shows <name> needs to be reconnected and the person clicks Reconnect.

Why people get signed outWhat to do
About an hour after every sign-inThe provider isn’t allowing renewals. Add offline_access (Microsoft, Okta, most others), or the Google parameters above. Then everyone reconnects once.
Their password changed, their account was disabled, or an admin ended their sessionsThey reconnect.
The client secret expiredPaste a new one in Edit config → Authentication, then people reconnect.
An admin changed the connector’s sign-in methodThis signs everyone out on purpose. Everyone connects again.

Nothing is renewed in the background, so a connection nobody uses for a long time may need a reconnect.

Reference

API key header and prefix

Prefix is added in front of the key exactly as typed, so include the trailing space: Bearer (with a space) sends Bearer abc123.

The service expectsHeaderPrefix
Authorization: Bearer <token>AuthorizationBearer
Authorization: token <token>Authorizationtoken
X-API-Key: <key>X-API-Key(empty)

If the service also needs a second fixed header, such as an API version, see Fixed headers.

More sign-in settings

Edit config → Authentication has a few settings the install page doesn’t. Most people never need them.

  • Discovery URL (optional): fills in the sign-in addresses from the provider.
  • Advanced → Subject claim path: which field identifies the person, if not the usual one.
  • Advanced → Token endpoint auth method: how the client secret is sent on the first sign-in.
  • Advanced → Extra authorize parameters: extra values the provider needs at sign-in, such as Google’s access_type.

Verify config checks that the provider answers, without saving.