> ## Documentation Index
> Fetch the complete documentation index at: https://auth0-genai-fix-a4aa-connections-content-audit.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# OAuth2

> Build a custom social connection for any OAuth2 compliant authorization server.

The custom OAuth2 connection allows you to create integrations with any OAuth2 compliant service that isn't available as a built-in integration type.

## Overview

If a specific identity provider or service isn't available out of the box, Auth0 allows you to create custom social connections. This is particularly useful for integrating with proprietary systems, regional services, or specialized OAuth2 providers.

To learn more and configure a custom OAuth2 connection with Auth0, see our [Connect Apps to Generic OAuth2 Authorization Servers documentation](https://auth0.com/docs/authenticate/identity-providers/social-identity-providers/oauth2).

## Configure Connected Accounts for Token Vault

After creating the connection, in the **Purpose** section, toggle on **Connected Accounts for Token Vault**. This allows your connection to retrieve and securely store access tokens for external APIs. To learn more, read [Connected Accounts for Token Vault](https://auth0.com/docs/secure/tokens/token-vault/connected-accounts-for-token-vault).

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  If your application uses [Organizations](https://auth0.com/docs/manage-users/organizations), authenticate the user with the target organization before initiating the Connected Accounts flow. Token Vault still stores the connected account on the user's Auth0 profile, so each organization member authorizes their own external account.
</Callout>

## Next steps

* To learn how to configure applications to access Token Vault, read [Configure Token Vault](https://auth0.com/docs/secure/tokens/token-vault/configure-token-vault).
* If your application uses [Organizations](https://auth0.com/docs/manage-users/organizations), authenticate the user with the target organization before initiating the Connected Accounts flow. Connected accounts remain linked to the individual user profile.
* To learn how to get an access token to make a tool call, complete the [Call third-party APIs on user's behalf Quickstart](https://auth0.com/ai/docs/get-started/call-others-apis-on-users-behalf).
