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

# Auth0

## Overview

Auth0 is an identity and access management platform that provides secure authentication, user management, and organization modeling capabilities. In Zenskar, you can connect Auth0 as a data source to sync user and organization data, enabling identity-aware billing workflows and enriched customer records. The Zenskar Auth0 data-source connector fetches data from [Auth0 Management API](https://auth0.com/docs/api/authentication#introduction).

***

## Prerequisites

* [Sign up for an account](https://auth0.com/signup) in Auth0.
* [Register a **Machine to Machine Application** named **Zenskar**](https://auth0.com/docs/get-started/auth0-overview/create-applications/machine-to-machine-apps). This allows Zenskar to make scheduled calls to Auth0 and generate access tokens automatically.
* [Get Management API access tokens for production](https://auth0.com/docs/secure/tokens/access-tokens/management-api-access-tokens/get-management-api-access-tokens-for-production). Zenskar uses the **Management API V2**.
* [Grant a set of permissions (or scopes)](https://auth0.com/docs/api/management/v2#!/Users/get_users) to the Machine to Machine Application named Zenskar.

| Supported stream                                                                                                  | Required scope                   |
| ----------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| [Clients](https://auth0.com/docs/api/management/v2#!/Clients/get_clients)                                         | `read:clients`                   |
| [Organizations](https://auth0.com/docs/api/management/v2#!/Organizations/get_organizations)                       | `read:organizations`             |
| [OrganizationMembers](https://auth0.com/docs/api/management/v2#!/Organizations/get_members)                       | `read:organization_members`      |
| [OrganizationMemberRoles](https://auth0.com/docs/api/management/v2#!/Organizations/get_organization_member_roles) | `read:organization_member_roles` |
| [Users](https://auth0.com/docs/api/management/v2#!/Users/get_users)                                               | `read:users`                     |

***

## Set up an Auth0 data-source connector via Zenskar dashboard

1. Log into your Zenskar dashboard.
2. In the left side bar, click **Usage** > **Data Sources**.
3. In the top-right corner, click **+ ADD DATA SOURCE**.
4. On the **Add New Data Source** page, [configure the Auth0 connector](https://docs.zenskar.com/docs/data-source-connector-for-auth0#connector-configuration).
5. Click on the **SAVE SOURCE** button.

### Connector configuration

#### General configuration

| Field           | Description                               | Required |
| :-------------- | :---------------------------------------- | :------- |
| **Source Name** | Enter a unique name for this data source. | Yes      |
| **Source Type** | Select **Auth0** from the dropdown menu.  | Yes      |

#### Data-source configuration

| Field                 | Description                                                                                                                                                                    | Required |
| :-------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
| Base URL              | The base endpoint of your Auth0 tenant. It follows the format `https://<yourDomain>`, where `<yourDomain>` is your Auth0 domain (for example, `https://zenskar.us.auth0.com`). | Yes      |
| Authentication Method | The authentication mode used to connect to Auth0. Available options are: 1) **OAuth2 Confidential Application**; 2) **OAuth2 Access Token**.                                   | Yes      |

<Callout icon="🚧" theme="warn">
  You must complete the corresponding conditional table below based on the **Authentication Method** you choose.
</Callout>

#### OAuth2 Confidential Application configuration

<Callout icon="🚧" theme="warn">
  These fields are required only if **Authentication Method** is set to **OAuth2 Confidential Application**.
</Callout>

| Field         | Description                                                                                                   | Required |
| ------------- | ------------------------------------------------------------------------------------------------------------- | -------- |
| Client ID     | The Client ID of your Auth0 Machine-to-Machine application (available in Auth0 Dashboard → Applications).     | Yes      |
| Client Secret | The Client Secret of your Auth0 Machine-to-Machine application (available in Auth0 Dashboard → Applications). | Yes      |

#### OAuth2 access token configuration

<Callout icon="🚧" theme="warn">
  These fields are required only if **Authentication Method** is set to **OAuth2 Access Token**.
</Callout>

| Field               | Description                                                                                  | Required |
| ------------------- | -------------------------------------------------------------------------------------------- | -------- |
| OAuth2 Access Token | Access token generated from the Auth0 Management API Explorer or via your Auth0 OAuth2 flow. | Yes      |

#### Data source access mode (read-only)

Zenskar queries data directly from Auth0 without syncing it to Zenskar’s data infrastructure. This option is:

* Ideal for **large databases** (more than 30 GB)
* Suitable for **real-time data access**
* **No sync waiting time**

***

## Addendum

### Supported Streams

| Stream                                                                                                            | Description                                                                      |
| ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| [Clients](https://auth0.com/docs/api/management/v2#!/Clients/get_clients)                                         | Retrieves details of all registered applications (clients) in your Auth0 tenant. |
| [Organizations](https://auth0.com/docs/api/management/v2#!/Organizations/get_organizations)                       | Retrieves organization records configured in your Auth0 account.                 |
| [OrganizationMembers](https://auth0.com/docs/api/management/v2#!/Organizations/get_members)                       | Lists members belonging to a specific organization.                              |
| [OrganizationMemberRoles](https://auth0.com/docs/api/management/v2#!/Organizations/get_organization_member_roles) | Lists roles assigned to members within an organization.                          |
| [Users](https://auth0.com/docs/api/management/v2#!/Users/get_users)                                               | Retrieves user profiles and metadata from your Auth0 tenant.                     |

***

## Notes

<Callout icon="🚧" theme="warn">
  The connector is restricted by [Auth0 rate limits](https://auth0.com/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy/management-api-endpoint-rate-limits).
</Callout>

<br />
