Set up OAuth 2.0 Authorization Code for an HTTP connector
OAuth 2.0. Use the Authorization Code Grant when an integration needs to access a connected system with each user’s permissions. The user signs in and grants access, then Moveworks exchanges an authorization code for tokens that represent that user. For other grants, see Choose a grant.
This guide applies to HTTP connectors used by plugins and by custom MCP servers that do not support Dynamic Client Registration (DCR).
How Authorization Code works
The authorization server handles sign-in and consent. Moveworks receives an authorization code, exchanges it for tokens, and uses the access token when the integration calls the connected system. The diagram shows the recommended flow with PKCE using a SHA256 challenge.
Proof Key for Code Exchange (PKCE) protects the authorization code from interception. The client secret authenticates the connector to the authorization server. These controls solve different problems, and a provider may require both.
Before you begin
Confirm that:
- You can create HTTP connectors in Tool Studio.
- You can register an OAuth application with the connected system’s authorization provider.
- The provider supports the Authorization Code Grant.
- You have the system’s base URL, authorization URL, token URL, required scopes, and any provider-specific parameters.
Register the callback URL
Register the callback URL for your Moveworks data center in the provider’s OAuth application. Replace <org> with your Moveworks organization name.
To find your organization name, open Tool Studio and copy the base URL. Your organization name is the subdomain. For example, the organization name in https://acme.moveworks.com is acme.
Moveworks automatically includes your organization-specific callback URL in the authorization request. Do not add a custom redirect_uri query parameter unless Moveworks instructs you to do so. If you select Has the oauth app been configured with a generic redirect URL, Moveworks sends the generic My Moveworks callback instead, so register that URL with the provider. Leave it cleared to use the URL in the table.
Configure the HTTP connector
Start creating the connector
Create an HTTP connector and fill in its details up to Auth Config. Users see Display Name (Optional) and Display Description (Optional) when they’re asked to grant access, so use the system name they recognize, such as Workday or Salesforce, and a short description of the access the integration requests.
Choose Authorization Code Grant
Set Auth Config to Oauth2, then set Oauth2 Grant Type to Authorization Code Grant.

Configure PKCE when required
Under PKCE code challenge method, select SHA-256 (S256) unless the provider rejects PKCE. If you leave both options cleared, Moveworks sends no PKCE challenge. Select Plain only if the provider supports PKCE but not S256.
Under PKCE code challenge method, select SHA-256 (S256) · Recommended for an OAuth-protected MCP server. Do not select Plain · Legacy for this connection path.

Moveworks adds response_type=code, your organization-specific redirect_uri, and a randomly generated state value to the authorization request, plus scope and the PKCE challenge from your settings. Do not add these values under additional request data or query parameters. If your provider needs access_type=offline to issue a refresh token, as Google does, add it under Authorization Request Query Parameters.
Configure recommended and advanced settings
Configure token revocation when the provider supports it:
- Revoke URL: Enter the provider’s token revocation endpoint.
- Instructions URL (Optional): Enter a user-facing page that explains how to revoke access when automatic revocation fails.
- Revocation token key: Use the request field expected by the provider. The default is
token. - Revocation authentication and headers: Match the provider’s requirements.
Configure provider-specific advanced settings
Some providers require additional authorization query parameters, token-request data, headers, or certificates. Configure these fields only when the provider’s documentation or Moveworks requires them.
Common examples include:
- An
audience,promptoraccess_type=offlineauthorization query parameter. - Additional token-request data sent as
application/x-www-form-urlencoded. - Additional request headers or common query parameters.
- X.509 certificates, private keys, or a CSRF endpoint.
Do not manually add state, response_type or redirect_uri. Moveworks adds them automatically. API calls always send the access token as Authorization: Bearer <token>; this grant doesn’t use Header Auth Key or Header Auth Value Pattern.
Route calls through the On-Prem Agent
The Moveworks On-Prem Agent can handle token exchange, refresh, revoke, and API calls for this connector from inside your network. The agent encrypts each employee’s access and refresh tokens before they leave your network, and Moveworks stores only the encrypted form. The employee’s browser still opens the Authorization URL directly.
This route requires:
- Agent 2.11.0 or later, with a
user_rest_configsentry for the system and at least one key inencryption_keys. - On-premise OAuth agent routing enabled for your organization by Moveworks. Without it, saving a connector that names an on-premise service fails with “On-premise OAuth agent routing is not enabled for this org.”
Set these fields on the connector:
To move an existing connector to agent-side encryption, create a new connector. Tokens stored under the previous format cannot be unlocked by the agent. Delete the old connector after the new one works.
Validate the connector
Authorize the connector, then validate the path that uses it.
Plugin
MCP Workspace
Open an action, event, path, or query that uses the connector. Test the request in the HTTP editor and confirm that the connected system returns the expected response with the test user’s permissions.
Return to Connect a Server, select the connector for the custom server, and generate a token. Select Preview Tools and confirm that the server returns the expected tool inventory.
If validation fails, check the callback URL, authorization and token URLs, client credentials, scopes, PKCE selection, and any provider-specific parameters. For a connector routed through the On-Prem Agent, an agent log error of the form user auth connector [NAME] not configured. Available connectors are [...] means On-Premise Service Name does not match any user_rest_configs service on the agent.
What users experience
When an integration needs user authorization, Moveworks checks the required connectors before it runs:
- If the user has a valid token, the integration continues.
- If the user has not authorized the connector or the token is invalid, the assistant asks the user to grant access.
- The user opens the authorization link and signs in with the connected system.
- The user grants consent and returns to the assistant.
- Moveworks resumes the original request automatically.

Moveworks preserves the original request for 30 minutes while the user completes authorization. After 30 minutes, the user must make the request again.
If an integration requires authorization for multiple connectors, the assistant presents them together and shows the user’s progress. The integration runs after the user authorizes every required connector.
Limitations
Notify actions (for example, approval workflows that send a message and wait for a response from another user) are not supported with preflight check. If your plugin uses a notify action, the preflight check and auto-restart behavior described above will not apply. This is a known limitation.
Add every user who needs to authorize an integration to My Moveworks SSO. This gives users access to the connections page where they grant consent. It does not give them access to admin or developer products without the corresponding roles. Use the SSO documentation to configure access.