> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apexgenius.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Salesforce

> Create a Salesforce project and authorize one production org or sandbox through Salesforce OAuth.

Salesforce is the one ApexGenius connection that uses a project. One Salesforce project identifies one authorized Salesforce org and its metadata workspace.

## Prerequisites

* A Salesforce user who can authorize API access to the intended org
* The correct environment: Production or Sandbox
* An available Salesforce org slot in your ApexGenius plan

ApexGenius supplies the shared Salesforce OAuth client. You do not paste a consumer key or consumer secret into the normal connection flow.

## Steps to connect

1. In ApexGenius, open **Connections**.
2. Select **Salesforce**.
3. Choose **Connect Salesforce** or **Manage Salesforce**.
4. Create or select the Salesforce project that will represent this org.
5. Choose **Production** or **Sandbox**.
6. Complete the Salesforce OAuth consent flow.
7. Return to ApexGenius and check the connection status.

<Tip>
  **Connected.**

  The Salesforce connection stays inside its Salesforce project. Other business-system connections do not inherit that project context.
</Tip>

## Permissions and revocation

Salesforce applies the permissions of the user who authorizes the connection. ApexGenius cannot grant Salesforce access that the connected user does not already have.

To revoke access from Salesforce, open **Setup → External Client Apps OAuth Usage** and revoke the applicable ApexGenius token. You can also disconnect the Salesforce project in ApexGenius.

## Official Salesforce documentation

* <a href="https://help.salesforce.com/s/articleView?id=sf.configure_external_client_app_oauth_settings.htm&language=en_US" target="_blank" rel="noreferrer">Salesforce External Client App OAuth settings</a>
* <a href="https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_web_server_flow.htm&language=en_US&type=5" target="_blank" rel="noreferrer">Salesforce OAuth web-server flow</a>
* <a href="https://help.salesforce.com/s/articleView?id=sf.manage_external_client_apps.htm&language=en_US&type=5" target="_blank" rel="noreferrer">Manage and revoke External Client App access</a>

Salesforce documentation is authoritative for OAuth behavior, user permissions, org policies, and token revocation.

## Next steps

<Columns cols={2}>
  <Card title="Load your metadata" href="/getting-started/load-metadata">Sync your org so ApexGenius can analyze it.</Card>
  <Card title="Troubleshooting" href="/troubleshooting/common-issues">Fix connection issues.</Card>
</Columns>
