Set up the Salesforce Data Cloud connector
Configure the Salesforce Data Cloud connector in AI Studio under Connectors & Tools. The Salesforce Data Cloud connector requires organization-managed OAuth authentication.The Salesforce Data Cloud connector only supports organization-managed OAuth. You must create your own Salesforce External Client App. WRITER-managed OAuth is not available for Salesforce.
Create a Salesforce OAuth external client app
Create an OAuth 2.0 application in Salesforce:- From Salesforce Setup, navigate to External Client App Manager
- Select New External Client App
- Enter the basic information (app name, API name, contact email)
- Expand API (Enable OAuth Settings) and select Enable OAuth Settings
- Add the Writer redirect URI to Callback URL:
- Under OAuth Scopes, add the required scopes
- Under Flow Enablement, check Enable Authorization Code and Credentials Flow
- Under Security, check the following options:
- Require secret for Web Server Flow
- Require secret for Refresh Token Flow
- Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows
- Issue JSON Web Token (JWT)-based access tokens for named users
- Select Create to save the External Client App
- Update Salesforce User Interface settings to enable the MCP service
- Retrieve your consumer key and secret for use in AI Studio
OAuth scopes
Required
api(Manage user data via APIs) - Salesforce REST API accesssfap_api(Access the Salesforce API Platform) - Grants access to Salesforce-hosted platform APIs outside core CRM and Data Cloud servicesrefresh_token, offline_access(Perform requests at any time) - Allows the connector to refresh expired access tokens
Recommended
full(Full access) - Recommended for Sandbox environments
Enable the MCP service
Enable the MCP service in Salesforce to allow MCP connector access:- From Salesforce Setup, navigate to User Interface
- Under Setup, check Enable MCP Service (Beta)
- Select Save
Retrieve your consumer key and secret
Retrieve the credentials for AI Studio:- In Salesforce Setup, navigate to External Client App Manager
- Select the External Client App you created
- Go to the Settings tab and expand OAuth Settings
- Copy the Consumer Key (client ID) and Consumer Secret (client secret)
Configure the connector in AI Studio
After creating your Salesforce External Client App and enabling the MCP service:- Navigate to Connectors & Tools in AI Studio
- Select the Salesforce Data Cloud connector
- Select who has access by default (all users or specific teams)
- Select which tools to enable for your agents
- Enter your Salesforce org URL (tenant URL), Consumer Key (client ID), and Consumer Secret (client secret)
- Complete the OAuth authorization flow
Next steps
- Set up connectors: Learn how to configure and enable connectors in AI Studio
- Tool calling guide: Understand how AI agents use tools in conversations
- WRITER Agent guide: Learn how to use WRITER Agent with connected tools
- MCP gateway overview: Learn about Writer’s MCP gateway architecture