Connector guide13-minute read51 MCP tools7 languages

How to Connect WorkOS to Microsoft Copilot via MCP

WorkOS API for B2B identity in one environment: organizations and their domains, AuthKit users, memberships, invitations and sessions, SSO connections, Directory Sync directories, users and groups, Audit Logs exports, the event stream, and RBAC roles and permissions. Creates and updates organizations, users, memberships and invitations; deletes and revokes are switched off at install.

HCBy HelpCode teamUpdated 13 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

WorkOS

WorkOS

WorkOS API for B2B identity: organizations and their domains, AuthKit users, memberships, invitations and sessions, SSO connections, Directory Sync directories, users and groups, Audit Logs exports, the event stream, and RBAC roles and permissions. Can create and update organizations, users, memberships and invitations; deletes and revokes install switched off.

tools

51

Region

INTL

Category

Infrastructure

Authentication

Bearer Token

Required env vars

WORKOS_API_KEY
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the WorkOS in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

WorkOS API for B2B identity in one environment: organizations and their domains, AuthKit users, memberships, invitations and sessions, SSO connections, Directory Sync directories, users and groups, Audit Logs exports, the event stream, and RBAC roles and permissions. Creates and updates organizations, users, memberships and invitations; deletes and revokes are switched off at install.

Try asking

Example prompts for WorkOS

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

WorkOS · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → WorkOS, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

WorkOS + Microsoft Copilot

WorkOS API for B2B identity in one environment: organizations and their domains, AuthKit users, memberships, invitations and sessions, SSO connections, Directory Sync directories, users and groups, Audit Logs exports, the event stream, and RBAC roles and permissions. Creates and updates organizations, users, memberships and invitations; deletes and revokes are switched off at install.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

WORKOS_API_KEY

Step 1 — Get credentials

Setting up takes about 2 minutes.

  1. Open https://dashboard.workos.com, pick the environment (Sandbox or Production) in the top bar and open API Keys.
  2. Create a secret key (sk_..., shown once) and paste it into WORKOS_API_KEY, without spaces or a Bearer prefix.
  3. Install the connector and run workos_list_organizations: it lists the organizations of the environment and confirms the key.

A key belongs to one environment and has full access to that environment's API: WorkOS keys have no scopes. Start with a Sandbox key, and use a Production key only when the AI should work on real data.

Personal and sensitive data: the key reaches the identity data of every organization in the environment, and the AI reads whatever a tool returns: names and email addresses, sign-in identities, session IP addresses and user agents, directory users with job titles, organization metadata and Stripe customer ids, and audit log content. workos_get_directory_user and workos_get_directory_group return the provider's raw attributes in full, which can hold phone numbers, manager, department and employee ids; the list tools leave them out. The AI shares only what the task needs.

Secret values: the connector never returns the API key. Invitation answers have their token and accept_invitation_url removed, because that link lets anyone who has it join the organization. workos_get_audit_log_export returns a short-lived download link (url) to the CSV; the AI treats it like a password and does not paste it anywhere else.

Organizations and domains: workos_list_organizations (filter by name text or domain), workos_get_organization, workos_get_organization_by_external_id, workos_create_organization and workos_update_organization. workos_create_organization_domain adds a domain as pending with a DNS TXT record (verification_prefix, verification_token) for the domain owner to publish; then workos_verify_organization_domain starts the check and workos_get_organization_domain shows the state.

Users, memberships and roles: workos_list_users (by email or organization_id), workos_get_user, workos_get_user_by_external_id, workos_create_user (without a password; the person signs in with Magic Auth, social login, SSO or an invitation) and workos_update_user; sign-in providers with workos_list_user_identities, sessions with workos_list_user_sessions. Memberships: workos_list_organization_memberships, workos_get_organization_membership, workos_create_organization_membership, workos_update_organization_membership to change the role, and workos_deactivate_organization_membership and workos_reactivate_organization_membership to block and restore access. Role slugs come from workos_list_roles, workos_get_role and workos_list_organization_roles (custom roles start with org-), permissions from workos_list_permissions.

Invitations: workos_list_invitations, workos_get_invitation, workos_send_invitation (WorkOS sends the email itself) and workos_resend_invitation.

SSO and Directory Sync: workos_list_connections and workos_get_connection show the connection type and state (active means users can sign in). workos_list_directories, workos_get_directory, workos_list_directory_users (needs directory or group), workos_get_directory_user, workos_list_directory_groups (needs directory or user) and workos_get_directory_group read the synced users and groups; workos_sync_directory queues a sync right away.

Audit Logs and events: workos_list_audit_log_actions and workos_list_audit_log_schemas show what is logged. workos_create_audit_log_export starts a CSV export for a time range (it writes no events) and workos_get_audit_log_export reports on it until state is ready; workos_get_audit_log_retention says how many days events are kept. workos_list_events reads the event stream by type (user.created, organization_membership.updated, dsync.user.created, connection.activated and so on) with range_start and range_end; order: asc replays them in sequence. The API keeps 90 days of events, and one call covers at most 30 days.

Updates: workos_update_organization and workos_update_user change only the fields you pass, but domain_data and metadata replace the stored value, so the AI sends the full list or object. Changing a user's email resets email_verified to false. A new role on a membership replaces the current one.

Switched off at install: workos_delete_organization, workos_delete_organization_domain, workos_delete_user, workos_delete_organization_membership, workos_revoke_invitation, workos_revoke_session and workos_create_audit_log_event. They cannot be undone (audit log events cannot be removed once written), so a workspace admin turns them on when the team needs them.

Data formats: ids carry a type prefix (org_, org_domain_, user_, om_, invitation_, session_, conn_, directory_, directory_user_, directory_group_, audit_log_export_, event_). Timestamps are ISO 8601 in UTC. Lists come as {"object": "list", "data": [...], "list_metadata": {...}}. metadata values are strings.

Paging: lists return 10 items by default, up to 100 with limit, newest first. For the next page the AI passes list_metadata.after as after and stops when it is null; workos_list_events pages the same way.

Limits: 6,000 requests a minute per key; AuthKit 1,000 reads and 500 writes per 10 seconds; directory users 4 requests a second per directory; organization deletes 50 a minute. Invitation emails count toward WorkOS's email sending limits.

Common errors: 401 means a wrong or revoked key. 403 means the key may not do this or the feature is not enabled for the environment. 404 means an unknown id, or an id from another environment. 400 or 422 means an invalid field, and the body names it. 429 means the rate limit: wait and retry once.

The connector does not configure SSO connections, AuthKit branding, redirect URIs, Vault, Pipes or API keys, does not set passwords, and never signs anyone in.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Microsoft Copilot

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Microsoft Copilot uses MCP servers through agents built in Copilot Studio: you add AnythingMCP to an agent as a tool, then publish the agent to Microsoft 365 Copilot and Teams. Copilot Studio connects from Microsoft's cloud over Streamable HTTP, which AnythingMCP supports.

  1. In Copilot Studio, open your agent (or create one), go to Tools and choose Add a tool → New tool → Model Context Protocol.
  2. Enter a Server name (for example AnythingMCP), a Server description that says what the connector does, and the Server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID. Copilot Studio uses the description to decide when to call the server.
  3. Under authentication, choose API key, set Type to Header and the header name to X-API-Key, then select Create.
  4. In Add tool, choose Create a new connection, paste an MCP API key from AnythingMCP (MCP Servers → your server → API keys) and select Add to agent.
  5. Try it in the agent's Test pane: ask for something that needs the WorkOS tools.
  6. Select Publish, then Channels → Microsoft 365 and Microsoft Teams, keep Make agent available in Microsoft Copilot selected and choose Add channel. See agent in Teams installs it for you; in Microsoft 365 Copilot, type @ and pick the agent.

Prefer per-user sign-in? Choose OAuth 2.0 → Dynamic discovery instead of an API key: each user then signs in to AnythingMCP the first time the agent calls it.

Self-hosting? Use your instance's public HTTPS address instead of https://cloud.anythingmcp.com. Copilot Studio connects from Microsoft's cloud, so localhost does not work.

Available tools

ToolWhat it does
workos_list_organizationsList organizations (the customer companies of this WorkOS environment), newest first: id, name, external_id, domains with their…
workos_get_organizationOne organization by id: name, domains (each with id, state and verification strategy), external_id, stripe_customer_id, metadata and…
workos_get_organization_by_external_idOne organization by the external_id your own application stored on it
workos_create_organizationCreate an organization
workos_update_organizationUpdate an organization: name, domains (domain_data replaces the whole list), external_id, Stripe customer id, metadata or the…
workos_delete_organizationPermanently delete an organization together with its SSO connections and directories
workos_get_organization_domainOne organization domain: domain name, state (pending, verified, failed, legacy_verified), verification strategy (dns or manual), the DNS…
workos_create_organization_domainAdd a domain to an organization
workos_verify_organization_domainStart DNS verification of a pending organization domain after its TXT record was published
workos_delete_organization_domainRemove a domain from its organization
workos_list_usersList AuthKit users of the environment, newest first: id, email, email_verified, first and last name, profile picture URL, external_id…
workos_get_userOne AuthKit user by id: email, verification state, names, external_id, metadata, locale and last sign-in time
workos_get_user_by_external_idOne AuthKit user by the external_id your own application stored on it
workos_create_userCreate an AuthKit user without a password; the person signs in with a method enabled in the environment (Magic Auth, social or SSO) or…
workos_update_userUpdate an AuthKit user: name, email (resets email_verified to false), email_verified, external_id, metadata or locale
workos_delete_userPermanently delete an AuthKit user with their memberships, identities and sessions
workos_list_user_identitiesThe sign-in identities linked to a user: provider (e.g
workos_list_user_sessionsA user's AuthKit sessions, newest first: id, status, auth_method, organization_id, ip_address, user_agent, impersonator, expires_at and…
workos_revoke_sessionEnd one AuthKit session (sign the user out of that device)
workos_list_organization_membershipsList organization memberships (which user belongs to which organization, with role(s) and status active, inactive or pending)
workos_get_organization_membershipOne organization membership: user, organization, role(s), status, whether a directory manages it, and IdP custom attributes
workos_create_organization_membershipAdd an existing AuthKit user to an organization with one role (role_slug) or several (role_slugs)
workos_update_organization_membershipChange the role(s) of an organization membership; the new role replaces the current one
workos_deactivate_organization_membershipDeactivate a membership: the user keeps the account and the membership record but can no longer sign in to that organization
workos_reactivate_organization_membershipReactivate an inactive membership, with its previous role(s)
workos_delete_organization_membershipPermanently remove a user from an organization
workos_list_invitationsList invitations, newest first: email, state (pending, accepted, expired, revoked), organization, role, inviter, expires_at
workos_get_invitationOne invitation by id with its state and expiry, without the token and accept link
workos_send_invitationInvite someone by email, optionally into an organization with a role
workos_resend_invitationSend the email of a pending invitation again, optionally in another language
workos_revoke_invitationRevoke a pending invitation so its link stops working
workos_list_connectionsList SSO connections, newest first: id, name, organization_id, connection_type (OktaSAML, AzureSAML, GoogleOAuth, GenericOIDC, ...), state…
workos_get_connectionOne SSO connection by id: connection type, state, organization and domains
workos_list_directoriesList Directory Sync directories (SCIM, Entra ID, Google Workspace, Okta, BambooHR, ...), newest first: id, name, type, state (linked…
workos_get_directoryOne directory: type, state, organization, domain and user and group counts
workos_sync_directoryAsk WorkOS to sync a directory from its provider now
workos_list_directory_usersList users synced from a directory or a directory group: name, emails, username, job title, state (active, suspended, inactive), role(s)…
workos_get_directory_userOne directory user with everything the provider sent, including raw_attributes (can hold phone numbers, manager, department, employee ids)
workos_list_directory_groupsList groups synced from a directory, or the groups of one directory user: id, name, idp_id. raw_attributes are left out
workos_get_directory_groupOne directory group by id: name, idp_id, directory, organization and the provider's raw_attributes
workos_list_audit_log_actionsList the Audit Logs actions configured in the environment (e.g. user.signed_in, document.updated) with their latest schema
workos_list_audit_log_schemasList the schema versions of one Audit Logs action: allowed target types and the actor, target and metadata JSON schemas
workos_create_audit_log_eventWrite an event into an organization's audit log
workos_create_audit_log_exportStart a CSV export of an organization's audit log events for a time range, optionally filtered by actions, actors and target types
workos_get_audit_log_exportState of an audit log export (pending, ready, error)
workos_get_audit_log_retentionHow many days an organization's audit log events are kept (retention_period_in_days)
workos_list_eventsRead the environment's event stream (what happened in WorkOS and at the connected identity and directory providers): id, event type…
workos_list_rolesList the environment roles (RBAC) with slug, name, description, permissions and type, the roles every organization starts with
workos_get_roleOne environment role by slug: name, description, type and its permission slugs
workos_list_organization_rolesAll roles available in one organization: the environment roles plus its own custom roles (slugs starting with org-), with permissions
workos_list_permissionsList the RBAC permissions defined in the environment: slug, name, description

Example prompts

  • "Which organizations have an SSO connection that is not active yet?"
  • "List the members of the organization Acme Corp with their roles and status."
  • "Invite [email protected] to the organization Acme Corp with the role admin."
  • "Which directories are in the state invalid_credentials, and which organizations do they belong to?"
  • "Export the audit log of Acme Corp for October as a CSV file."

FAQ

Which Copilot is this for? Microsoft 365 Copilot at work, through agents built in Copilot Studio. The Microsoft Copilot app for personal accounts has no option to add your own MCP server.

What do I need? A work account with access to Copilot Studio (a license or a trial) to build the agent. People who use it in Microsoft 365 Copilot or Teams need access to the agent: share it with them, or ask an admin to publish it to the organization. If your organization applies data policies to Power Platform connectors, they cover MCP servers too.

The agent doesn't call the tools. Check that the header name is exactly X-API-Key and that the key belongs to the same MCP server as the URL, and make the server description specific: Copilot Studio uses it to decide when to call the server. Publish the agent again after each change; in an open chat, type "start over" to get the new version.

Next steps

Was this guide helpful?

Your WorkOS agent is one click away.

Install the connector, paste the key, prompt Microsoft Copilot. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect WorkOS to ChatGPT via MCP

WorkOS API for B2B identity in one environment: organizations and their domains, AuthKit users, memberships, invitations and sessions, SSO connections, Directory Sync directories, users and groups, Audit Logs exports, the event stream, and RBAC roles and permissions. Creates and updates organizations, users, memberships and invitations; deletes and revokes are switched off at install.

Connectors

How to Connect WorkOS to Claude via MCP

WorkOS API for B2B identity in one environment: organizations and their domains, AuthKit users, memberships, invitations and sessions, SSO connections, Directory Sync directories, users and groups, Audit Logs exports, the event stream, and RBAC roles and permissions. Creates and updates organizations, users, memberships and invitations; deletes and revokes are switched off at install.

Connectors

How to Connect WorkOS to Cursor via MCP

WorkOS API for B2B identity in one environment: organizations and their domains, AuthKit users, memberships, invitations and sessions, SSO connections, Directory Sync directories, users and groups, Audit Logs exports, the event stream, and RBAC roles and permissions. Creates and updates organizations, users, memberships and invitations; deletes and revokes are switched off at install.

Connectors

How to Connect WorkOS to Gemini via MCP

WorkOS API for B2B identity in one environment: organizations and their domains, AuthKit users, memberships, invitations and sessions, SSO connections, Directory Sync directories, users and groups, Audit Logs exports, the event stream, and RBAC roles and permissions. Creates and updates organizations, users, memberships and invitations; deletes and revokes are switched off at install.

Connectors

How to Connect WorkOS to Meta Muse via MCP

WorkOS API for B2B identity in one environment: organizations and their domains, AuthKit users, memberships, invitations and sessions, SSO connections, Directory Sync directories, users and groups, Audit Logs exports, the event stream, and RBAC roles and permissions. Creates and updates organizations, users, memberships and invitations; deletes and revokes are switched off at install.

Connectors

WorkOS to MCP: Organizations, AuthKit Users, SSO, Directory Sync, Audit Logs and RBAC in any AI Agent

WorkOS API for B2B identity in one environment: organizations and their domains, AuthKit users, memberships, invitations and sessions, SSO connections, Directory Sync directories, users and groups, Audit Logs exports, the event stream, and RBAC roles and permissions. Creates and updates organizations, users, memberships and invitations; deletes and revokes are switched off at install.