Search docs.molo17.com

    Databricks glyph Databricks agent

    Target Databricks

    Prerequisites

    To have Gluesync writing into your Databricks workspace you will need:

    • A workspace with Unity Catalog, reachable over HTTPS (port 443) from Core Hub;

    • A SQL warehouse. Serverless warehouses start on the first statement;

    • A Unity Catalog catalog, with the schemas the entities are written to. Gluesync creates tables, not schemas;

    • An identity Gluesync signs in as, with the access listed in Access the identity needs. Choose one of the supported authentication methods: a service principal with an OAuth secret (recommended), a personal access token, or, NEW, OAuth token federation, which needs no Databricks secret, or, NEW and on Azure Databricks only, a Microsoft Entra ID service principal, or, NEW, the sign-in of a user with OAuth U2M, for interactive, development and proof-of-concept use;

    • A workspace admin, or an account admin, to create that identity and grant it access. For the sign-in of a user, an account admin creates the custom OAuth app connection.

    Authentication

    Gluesync calls the Databricks REST API of the workspace (SQL Statement Execution, SQL warehouses and, for bulk snapshots, Files) with a bearer token. The Authentication mode field selects how that token is obtained:

    Method Authentication mode How Gluesync gets the token

    OAuth machine-to-machine (M2M) with a service principal (recommended)

    SERVICE_PRINCIPAL (default)

    Requests an access token from the workspace with the client ID and the OAuth secret, caches it until shortly before it expires, and requests a new one when Databricks rejects it.

    Personal access token (PAT)

    PAT

    Sends the token you paste as it is. Gluesync does not renew it: when it expires or is revoked, replace it.

    OAuth token federation (NEW)

    TOKEN_FEDERATION

    Reads a JWT from a file, an environment variable or your identity provider, exchanges it at the workspace for an access token that a federation policy allows, and exchanges again before that token expires. No Databricks secret is stored in Gluesync.

    Microsoft Entra ID service principal (NEW) (Azure Databricks only)

    ENTRA_SERVICE_PRINCIPAL

    Requests an access token for the Azure Databricks resource from Microsoft Entra ID with the application (client) ID and the client secret of an Entra service principal, caches it until shortly before it expires, and requests a new one when Databricks rejects it.

    User sign-in with OAuth U2M (NEW)

    U2M

    A user signs in to Databricks from Core Hub in the browser, with the authorization code grant and PKCE, and the pipelines run as that user. Core Hub holds the refresh token, encrypted, and hands its access tokens to the agents. For interactive, development and proof-of-concept use.

    All the methods end at the same place: the identity needs the access described in Access the identity needs, and Test and continue checks the connection as described in Verify the connection.

    OAuth M2M with a service principal (recommended)

    A service principal is an identity for automation. Its OAuth secret is not tied to a person, so the pipeline keeps working when people change role. Gluesync requests the token from <workspace URL>/oidc/v1/token with the client credentials grant and the all-apis scope.

    Prerequisites

    • A workspace admin, or an account admin, to create the service principal and its secret;

    • Permission to grant privileges on the catalog, schemas and volume, as the owner of the object or with MANAGE on it, or as a metastore admin.

    Create the service principal and its secret in Databricks

    1. Create the service principal and add it to the workspace. As a workspace admin, click your username in the top bar, select Settings, open the Identity and access tab, select Manage next to Service principals, select Add service principal and choose an existing one, or select Add new, enter a name and select Add. Select the entitlements for it, and include Databricks SQL access, which covers SQL warehouses. As an account admin you can instead create it under User management in the account console and assign it to the workspace under Workspaces → your workspace → Permissions → Add permissions. See Manage service principals and Manage entitlements.

    2. Generate an OAuth secret. In Settings → Identity and access → Service principals → Manage, select the service principal, open the Secrets tab and select Generate secret. Set the lifetime in days (the maximum is 730) and leave the scopes at all APIs: Gluesync requests the all-apis scope, and a token cannot exceed the scopes of its secret. Select Generate.

    3. Copy the secret and the client ID. Databricks shows the secret only once. The client ID is the application ID of the service principal. See Authenticate access to Databricks with a service principal using OAuth (M2M).

    4. Grant the service principal the access in Access the identity needs. In the statements, write it as its application ID between backticks:

      GRANT USE CATALOG ON CATALOG main TO `<application-id>`;

    Enter the values in Gluesync

    Field Value

    Workspace URL (https://…​)

    https://<workspace-host>; of the workspace the service principal belongs to.

    Authentication mode

    SERVICE_PRINCIPAL

    Service principal client ID

    The client ID (application ID) of the service principal.

    Client secret or personal access token

    The OAuth secret.

    SQL warehouse ID, Unity Catalog catalog

    As described in Setup via Web UI.

    Select Test and continue and check the result as described in Verify the connection.

    Rotate the secret. A secret expires at the end of the lifetime you gave it, and a service principal can hold up to five. Generate a new secret before the old one expires, enter it in Client secret or personal access token, test the connection and then delete the old secret in Databricks.

    Personal access token (PAT)

    A PAT is a token a person, or a service principal, generates in the workspace. It is the shortest path to a first test. Use it for a proof of concept: the token belongs to its creator, expires on a date, and stops working if that person loses access.

    Prerequisites

    • Personal access token authentication enabled in the workspace: a workspace admin turns it on under the Advanced tab of the admin settings, with the Personal Access Tokens toggle, and it is enabled by default;

    • Permission to create tokens, which a workspace admin controls (Manage personal access tokens);

    • Permission to grant privileges on the catalog, schemas and volume, as the owner of the object or with MANAGE on it, or as a metastore admin.

    Create the token in Databricks

    1. Sign in to the workspace as the user the token is for. Click your username in the top bar, select Settings, then Developer, select Manage next to Access tokens and then Generate new token.

    2. Enter a name and set the lifetime in days. If the dialog asks for scopes, choose Other APIs and select the scopes for the calls the agent makes: sql for the SQL Statement Execution API and the SQL warehouses API, and files for the Files API that bulk snapshots use. See API scopes.

    3. Select Generate, copy the token and select Done. See Authenticate access to Databricks with a personal access token.

    4. Grant the user the access in Access the identity needs. In the statements, write it as the user name between backticks, or grant the access to a group the user belongs to:

      GRANT USE CATALOG ON CATALOG main TO `data.engineer@example.com`;

    To use a token that belongs to a service principal instead, a workspace admin creates the first one on its behalf with databricks token-management create-obo-token <application-id>. Prefer OAuth M2M for that case, because Gluesync renews its token on its own.

    Enter the values in Gluesync

    Field Value

    Workspace URL (https://…​)

    https://<workspace-host>; of the workspace the token was generated in. A token is valid for one workspace only.

    Authentication mode

    PAT

    Service principal client ID

    Leave it empty.

    Client secret or personal access token

    The personal access token.

    SQL warehouse ID, Unity Catalog catalog

    As described in Setup via Web UI.

    Select Test and continue and check the result as described in Verify the connection.

    Rotate the token. Databricks revokes a token that is unused for 90 days and a token stops at the end of its lifetime. Generate a new token before that, enter it in Client secret or personal access token, test the connection and then revoke the old token.

    OAuth token federation (NEW)

    With token federation Core Hub proves who it is with a JWT that your identity provider issues, and exchanges it for a short-lived workspace token (RFC 8693 token exchange). No Databricks secret is stored in Gluesync: there is no OAuth secret to generate and rotate, and no personal access token to leak. The workspace accepts the JWT only when a federation policy matches its issuer, audience and subject. Gluesync posts the exchange to <workspace URL>/oidc/v1/token with the all-apis scope, caches the workspace token until shortly before it expires, and exchanges again when it is needed. Databricks bases the lifetime of the workspace token on the lifetime of the JWT, so a JWT that is renewed by its issuer keeps the pipeline signed in.

    Prefer it when the workload that runs Core Hub already has an identity: a Kubernetes service account, a CI/CD platform, or an OpenID Connect identity provider that can issue tokens to a client. Databricks recommends workload identity federation wherever it is possible. See Authenticate access to Databricks using OAuth token federation.

    Prerequisites

    • An account admin, to create the federation policy in the Databricks account console (Configure a federation policy);

    • A workspace admin, or an account admin, to add the service principal to the workspace when you use a service principal federation policy;

    • A source of JWTs that Core Hub can read, one of the three in [databricks-federation-sources]. The JWT must be signed with RS256 or ES256, and it must not have expired when Core Hub uses it;

    • An issuer whose public keys Databricks can read. Unless the policy carries the keys itself, Databricks fetches them from <issuer URL>/.well-known/openid-configuration, which must contain a jwks_uri;

    • Permission to grant privileges on the catalog, schemas and volume, as the owner of the object or with MANAGE on it, or as a metastore admin.

    Create the federation policy in Databricks

    1. Read the claims of the JWT Core Hub will present: the issuer (iss), the audience (aud) and the subject (sub). Decode the payload, which is the second dot-separated segment of the token, on your own machine and never on a website: a JWT is a credential until it expires. If a Gluesync connection check fails, its message lists the same three claims, see Troubleshooting authentication and access.

    2. Choose the kind of policy. Both kinds are created by an account admin. Use a service principal federation policy when Gluesync should sign in as one service principal that you name.

      Policy What it does Service principal client ID in Gluesync

      Service principal federation policy

      Attached to one service principal: a JWT that matches the policy signs in as that service principal. The grants go to one identity that you name.

      The application ID (client ID) of the service principal.

      Account federation policy

      Applies to every user and service principal of the account. The claim named by the policy’s Subject claim holds the Databricks user name of the identity that signs in.

      Empty. Gluesync then sends no client_id in the exchange.

    3. Create the policy in the account console. For a service principal federation policy, click User management, open the Service principals tab, select the service principal, open the Credentials & secrets tab, and under Federation policies click Create policy. For an account federation policy, click Security, open the Identity provider setup tab, and under Federation policies click Create policy. Choose the federated credential provider, or enter the values yourself: the Issuer (an https:// URL, matched against iss), the Audiences (matched against aud, and at least one must match; the default is your Databricks account ID) and the Subject (matched against the claim in Subject claim, sub by default). If the issuer does not publish its keys at <issuer URL>/.well-known/openid-configuration, add them in JWKS JSON, or give a JWKS URI. Click Create policy.

      You can create the same policy with the Databricks CLI, signed in to the account with databricks auth login --host https://accounts.cloud.databricks.com --account-id <account-id>. For a service principal federation policy:

      databricks account service-principal-federation-policy create <service-principal-numeric-id> --json '{
        "oidc_policy": {
          "issuer": "<issuer>",
          "audiences": ["<audience>"],
          "subject": "<subject>"
        }
      }'

      For an account federation policy, with subject_claim naming the claim that holds the Databricks user name:

      databricks account federation-policy create --json '{
        "oidc_policy": {
          "issuer": "<issuer>",
          "audiences": ["<audience>"],
          "subject_claim": "sub"
        }
      }'
    4. For a service principal federation policy, add the service principal to the workspace, as in the first step of OAuth M2M with a service principal (recommended), with the Databricks SQL access entitlement. The exchange fails for a service principal that is not in the workspace. You do not generate an OAuth secret: the policy replaces it.

    5. Grant the identity the access in Access the identity needs. In the statements, write the service principal as its application ID between backticks.

    Databricks allows up to 20 policies for each service principal and 20 account federation policies for each account. Register only identity providers that your organization manages and trusts.

    Policy values for common workloads

    The issuer, audience and subject always come from the JWT you use. These are the values Databricks documents for platforms that issue workload tokens. Whatever the platform, the JWT must reach Core Hub through one of the sources in [databricks-federation-sources].

    Platform Issuer and audience Subject

    Kubernetes

    The issuer is the service account issuer of the cluster (--service-account-issuer of the API server). The audience is the one you set in the projected volume. See Configure service accounts for pods. Databricks reads the keys of the issuer from its .well-known/openid-configuration, which must be served over https; if Databricks cannot reach it, add the keys of the cluster to the policy as JWKS JSON.

    system:serviceaccount:<namespace>:<service-account-name>

    GitHub Actions

    Issuer https://token.actions.githubusercontent.com. The audience is your Databricks account ID, or the value you request for the token.

    repo:<org>/<repo>:environment:<environment>. For repositories created, renamed or transferred on or after July 15, 2026, GitHub uses repo:<org>@<org-id>/<repo>@<repo-id>:environment:<environment>. See Enable workload identity federation for GitHub Actions.

    GitLab CI/CD

    The issuer is the GitLab instance that issues the job token. The audience is the aud you set in the id_tokens: block of the job, and Databricks recommends your Databricks account ID.

    project_path:<group>/<project>:…​, the sub claim of the job token. See Enable workload identity federation for GitLab CI/CD.

    Azure DevOps Pipelines

    Issuer https://vstoken.dev.azure.com/<organization-id>;, audience api://AzureADTokenExchange.

    p://<organization-name>/<project-name>/<pipeline-name>. See Enable workload identity federation for Azure DevOps Pipelines.

    Enter the values in Gluesync

    Gluesync reads the JWT from the Federated token source you select. The form shows only the fields of the selected source.

    Field Value

    Workspace URL (https://…​)

    https://<workspace-host>; of the workspace the exchange is sent to.

    Authentication mode

    TOKEN_FEDERATION

    Service principal client ID

    The application ID of the service principal for a service principal federation policy. Leave it empty for an account federation policy.

    Federated token source

    FILE (default), ENVIRONMENT_VARIABLE or IDP_CLIENT_CREDENTIALS, described below.

    SQL warehouse ID, Unity Catalog catalog

    As described in Setup via Web UI.

    The Client secret or personal access token field is not used with token federation.

    File (FILE). The JWT is in a file that Core Hub can read.

    Field Value

    Federated JWT file path

    The path of the file as the Core Hub process sees it, for example /var/run/secrets/databricks/token. The file holds the JWT as text.

    Gluesync reads the file on every exchange, so a token that is renewed in place is picked up without a restart. This is the way to use a Kubernetes projected service account token, which Kubernetes refreshes: mount it in the Core Hub container and set the audience to the one in the policy.

    spec:
      containers:
        - name: core-hub
          volumeMounts:
            - name: databricks-token
              mountPath: /var/run/secrets/databricks
              readOnly: true
      volumes:
        - name: databricks-token
          projected:
            sources:
              - serviceAccountToken:
                  path: token
                  audience: <audience in the federation policy>
                  expirationSeconds: 3600

    Environment variable (ENVIRONMENT_VARIABLE). The JWT is in a variable of the Core Hub process.

    Field Value

    Federated JWT environment variable

    The name of the variable, for example DATABRICKS_FEDERATED_JWT. Write the name, not the token.

    Gluesync reads the variable on every exchange. The variable of a running process changes only when the process is started again, so use a file for a token that is renewed while Core Hub runs.

    Identity provider client credentials (IDP_CLIENT_CREDENTIALS). Gluesync asks your OpenID Connect identity provider for a JWT with the client credentials grant, and exchanges it. Use it when no platform writes a token for you and the identity provider can issue tokens to a client of its own.

    Field Value

    Identity provider token URL (https://…​)

    The token endpoint of the identity provider. It must start with https://.

    Identity provider client ID

    The client ID of the client you registered for Core Hub in the identity provider.

    Identity provider client secret

    The secret of that client. It is the only secret of this method, and Core Hub hides it when it shows the configuration.

    Identity provider scope

    Optional. Sent as scope when it is set, if your identity provider needs one.

    Identity provider audience

    Optional. Sent as audience when it is set, if your identity provider needs one to put the audience of the policy in the token.

    Gluesync sends grant_type=client_credentials, the client ID and the client secret as form fields to the token URL, and uses the access_token of the answer (the id_token when there is no access token). It must be a JWT whose issuer, audience and subject match the policy. Gluesync asks for a new JWT on every exchange and keeps none; it keeps the workspace token that the exchange returns.

    Select Test and continue and check the result as described in Verify the connection.

    Microsoft Entra ID service principal (NEW)

    On Azure Databricks the identity can be a Microsoft Entra ID service principal: an application you register in Microsoft Entra ID, whose client secret Gluesync exchanges for a Microsoft Entra access token for Azure Databricks. Gluesync posts the client credentials grant to <authority host>/<tenant ID>/oauth2/v2.0/token with the scope 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default, the identifier of the Azure Databricks resource, which is the same in every Azure cloud. It caches the token until shortly before it expires, and requests a new one when Databricks rejects it. The workspace accepts the token only for a service principal that was added to it.

    Databricks recommends OAuth M2M with an Azure Databricks managed service principal for automation that talks to Azure Databricks only, and Microsoft Entra ID managed service principals for cases where one identity has to authenticate with Azure Databricks and with other Azure resources. See Service principals and Authenticate with Microsoft Entra service principals.

    Prerequisites

    • An Azure Databricks workspace. The method is not available for Databricks on other clouds;

    • Permission to register applications in your Microsoft Entra tenant and to create a client secret for the application;

    • A workspace admin, or an account admin, to add the service principal to the workspace;

    • Core Hub able to reach the Microsoft Entra authority host over HTTPS, login.microsoftonline.com unless the tenant is in a national cloud, besides the workspace;

    • Permission to grant privileges on the catalog, schemas and volume, as the owner of the object or with MANAGE on it, or as a metastore admin.

    Register the application in Microsoft Entra ID

    1. Sign in to the Azure portal, switch to the tenant of the workspace with Directories + subscriptions if needed, and search for and select Microsoft Entra ID.

    2. Select Add → App registration, enter a Name, select Accounts in this organizational directory only (Single tenant) and select Register.

    3. On the Overview page, copy the Application (client) ID and the Directory (tenant) ID. Gluesync needs both.

    4. Open Certificates & secrets → Client secrets → New client secret, enter a description, set the expiry period and select Add. Copy the secret Value and store it securely. The Secret ID is not the secret. See Get Microsoft Entra ID tokens manually: Get tokens for service principals.

    Tenants in the Azure Government and the Microsoft Azure operated by 21Vianet clouds use their own Azure portal and their own Microsoft Entra authority host, see the Microsoft Entra authority host field below and Microsoft Entra authentication and national clouds.

    Add the service principal to the Azure Databricks workspace

    1. As a workspace admin, sign in to the workspace, click your username in the top bar, select Settings, open the Identity and access tab, select Manage next to Service principals and select Add service principal. Select Add new, select Microsoft Entra ID managed, paste the application (client) ID, enter a name and select Add. Then select the entitlements for the service principal, and include Databricks SQL access, which covers SQL warehouses. As an account admin you can instead create it under User management in the account console, with Management set to Microsoft Entra ID managed and the Microsoft Entra application ID filled in, and assign it to the workspace under Workspaces → your workspace → Permissions → Add permissions. See Manage service principals.

    2. Grant the service principal the access in Access the identity needs, including CAN USE on the SQL warehouse. In the statements, write it as its application ID between backticks:

      GRANT USE CATALOG ON CATALOG main TO `<application-id>`;

    Enter the values in Gluesync

    Field Value

    Workspace URL (https://…​)

    https://<workspace-host>; of the Azure Databricks workspace the service principal was added to, for example https://adb-1234567890123456.7.azuredatabricks.net.

    Authentication mode

    ENTRA_SERVICE_PRINCIPAL

    Service principal client ID

    The Application (client) ID of the app registration, a GUID.

    Client secret or personal access token

    The client secret Value, not the Secret ID.

    Microsoft Entra tenant ID

    The Directory (tenant) ID of the tenant that holds the app registration: a GUID, or a verified domain name such as contoso.onmicrosoft.com. Required.

    Microsoft Entra authority host (https://…​)

    The sign-in host of the cloud the tenant is in, https:// and the host alone, with no path. The default, https://login.microsoftonline.com, is the global Azure cloud. For a tenant in a national cloud use https://login.microsoftonline.us (Azure Government) or https://login.partner.microsoftonline.cn (Microsoft Azure operated by 21Vianet).

    SQL warehouse ID, Unity Catalog catalog

    As described in Setup via Web UI.

    Select Test and continue and check the result as described in Verify the connection.

    Rotate the secret. A client secret expires at the end of the expiry period you gave it. Create a new secret for the app registration before the old one expires, enter its value in Client secret or personal access token, test the connection and then delete the old secret in the Azure portal. A new value makes Gluesync request a new token.

    User sign-in with OAuth U2M (NEW)

    With user-to-machine (U2M) OAuth a person signs in to Databricks from Core Hub in their browser, and the pipelines that use the connection run as that person. Core Hub signs the user in with the OAuth authorization code grant and PKCE against the OIDC endpoints of the workspace, <workspace URL>/oidc/v1/authorize and <workspace URL>/oidc/v1/token, with the scopes all-apis and offline_access. Core Hub keeps the refresh token of the sign-in, encrypted in its own storage, and keeps the access tokens in memory only. Every agent that uses the connection gets its access tokens from Core Hub, which renews them for all of them at once. The agent never holds a refresh token, and no Databricks secret of the user is typed into Gluesync.

    Use it when the pipeline should act with the identity and the permissions of a person: interactive work, development and a proof of concept, where the grants of that person decide what the pipeline can read and write. Prefer OAuth M2M or OAuth token federation for a pipeline in production: their identity is not tied to a person, and they do not need anyone to sign in again. See Authorize user access to Databricks with OAuth (U2M).

    A sign-in belongs to a connection, not to a pipeline. Every pipeline whose agent uses the connection runs as the user who signed in to it, so sign in to a connection that is dedicated to this purpose.

    Prerequisites

    • An account admin, to create the custom OAuth app connection in the Databricks account console. The client IDs that Databricks publishes for its own tools, such as databricks-cli, are meant for those tools: the manual U2M flow in the Databricks documentation uses http://localhost:8020 as the redirect address, and Core Hub needs its own. Databricks states that, when you do not use one of its built-in tools, you must enable a custom OAuth application and use its client ID (Enable or disable partner OAuth applications);

    • A Core Hub that the browser reaches over HTTPS. Core Hub accepts a plain http:// address for the sign-in only on localhost or 127.0.0.1;

    • A Core Hub user who can manage connections (SUPER_ADMIN or MANAGER) to sign in, disconnect and edit the connection;

    • A Databricks user with the access listed in Access the identity needs, written in the statements as the user name between backticks, or granted to a group the user belongs to;

    • A browser that lets Core Hub open a pop-up window. The sign-in runs in it.

    Create the app connection in Databricks

    1. Copy the redirect URL from Gluesync. In Gluesync, create the connection, or open it, and set Authentication mode to U2M. The Databricks account control shows the redirect URL with a copy button, https://<core-hub-host>/connections/oauth/callback, built from the address your browser uses to reach Core Hub. If people reach Core Hub under more than one address, register the redirect URL of each of them.

    2. As an account admin, sign in to the account console and click the Settings icon in the sidebar. On the App connections tab, click Add connection.

    3. Enter a name, and paste the redirect URL in the redirect URLs of the connection.

    4. In Access scopes, select All APIs. The openid, email, profile and offline_access scopes are allowed automatically, and offline_access is the one that makes Databricks issue a refresh token: without it the sign-in fails because Databricks returns no refresh token.

    5. Set the token lifetimes, see [databricks-u2m-ttl]. The access token TTL, in minutes, defaults to 60, and the refresh token TTL, in minutes, defaults to 10080, which is 7 days.

    6. Choose the kind of client. A confidential client has a client secret: turn on Generate a client secret. A public client has none. Gluesync supports both.

    7. Create the connection. The Connection created dialog shows the client ID and, for a confidential client, the client secret. Copy them: Databricks does not show the secret again. See Enable or disable partner OAuth applications and, on Azure Databricks, Enable or disable partner OAuth applications, which describe the same steps for a custom application.

    A change to the redirect URLs or to a TTL of an existing app connection is made by opening it from Settings → App connections, and Databricks says that it can take about 30 minutes to apply.

    Choose the refresh token lifetime

    A refresh token stops working when its lifetime ends, and the pipeline then needs a new sign-in. With the default of 10080 minutes, that is every 7 days. Choose one of these:

    • Raise the refresh token TTL of the app connection. The API accepts values from 5 to 129600 minutes, which is 90 days. See the Create custom OAuth app integration reference;

    • Enable single-use refresh tokens, also known as refresh token rotation. Each time Core Hub uses a refresh token, Databricks issues a new one with a renewed lifetime and invalidates the old one, so a session lasts for as long as the connection is used, up to the absolute session lifetime that you set. Core Hub also renews a sign-in that nothing has used for a day. Databricks lists the option as Beta in its API reference, and configures it through the API or the CLI only, with enable_single_use_refresh_tokens and absolute_session_lifetime_in_minutes under token_access_policy, see Single-use refresh tokens.

    databricks account custom-app-integration update <app_integration_id> --json '{
      "token_access_policy": {
        "access_token_ttl_in_minutes": 60,
        "refresh_token_ttl_in_minutes": 1440,
        "enable_single_use_refresh_tokens": true,
        "absolute_session_lifetime_in_minutes": 43200
      }
    }'

    When the refresh token is refused, Core Hub marks the sign-in as requiring re-authentication, raises a warning notification titled Re-authentication required that lists the pipelines that use the connection, and the agents fail with Re-authentication Required until a user signs in again, see Troubleshooting authentication and access.

    Enter the values in Gluesync

    Field Value

    Workspace URL (https://…​)

    https://<workspace-host>; of the workspace the user signs in to.

    Authentication mode

    U2M. The form then hides Service principal client ID and Client secret or personal access token: they are not used.

    OAuth client ID of the app connection

    The client ID of the app connection. Required.

    OAuth client secret of the app connection

    The client secret of a confidential app connection. Leave it empty for a public one. Core Hub returns <hidden> in place of it when it shows the configuration.

    SQL warehouse ID, Unity Catalog catalog

    As described in Setup via Web UI.

    Sign in

    The sign-in needs a saved connection, because it belongs to the connection. In a form that is not saved yet, Gluesync saves the connection first.

    1. In Databricks account, select Sign in with Databricks. A window opens on the sign-in page of your workspace.

    2. Sign in to Databricks as the user the pipelines should run as, and approve the access that the app connection asks for.

    3. The window closes and the control shows Signed in as the display name of the user, or their email when Databricks has no display name for them. Core Hub reads it from the SCIM Me endpoint of the workspace with the new token, and the sign-in works without it when it cannot be read.

    The sign-in must be completed within 10 minutes and in the Core Hub session that started it, and it can be completed once. If the window is closed first, or another user’s session answers, select Sign in with Databricks again. Select Test and continue and check the result as described in Verify the connection.

    Status of the sign-in

    Status Meaning

    NOT_SIGNED_IN

    Nobody has signed in to this connection, or the sign-in was removed. The control offers Sign in with Databricks. The agents fail with Sign-in Required.

    SIGNED_IN

    A user is signed in. The control shows Signed in as, with Disconnect and Sign in again, and the pipelines on the connection run as that user.

    REAUTH_REQUIRED

    Databricks refused the refresh token for good: it expired, it was spent, or the consent or the app connection was removed. The control shows Re-authentication required and Sign in again. The agents fail with Re-authentication Required.

    A sign-in is the grant of one user to one app connection of one workspace. When the Workspace URL (https://…​), the OAuth client ID of the app connection, the OAuth client secret of the app connection or the Authentication mode of the connection changes, Core Hub removes the sign-in, and a user signs in again. Deleting the connection removes it as well. A temporary error of Databricks, such as an HTTP 5xx or 429, or a network failure, does not change the status: Core Hub asks again at the next request.

    Disconnect

    Disconnect removes the sign-in from Core Hub: it deletes the stored refresh token and the access token that Core Hub holds. The pipelines that use the connection fail with Sign-in Required at their next token request. An agent can keep the access token it already has for up to 5 minutes. Core Hub does not stop or start any pipeline by itself: start the pipelines that stopped once a user has signed in again.

    Databricks documents no endpoint to revoke an OAuth token. Core Hub asks the workspace to revoke the token only if its discovery document, <workspace URL>/oidc/.well-known/oauth-authorization-server, lists a revocation_endpoint, and a failure of that call does not stop the disconnect. As a result, the tokens Databricks already issued stay valid until they expire: an access token for its TTL, 60 minutes by default, and the refresh token for its TTL. To cut off a user at once:

    • Remove the grants of the user in Databricks, see Access the identity needs, or deactivate the user;

    • Remove the consent of the user with DELETE /api/2.0/oauth-app-integrations/<app-integration-id>/user-consent/me, which Databricks documents as not invalidating the tokens already issued, or delete the app connection in the account console, so that Databricks issues no new tokens through it.

    Backup, restore and disaster recovery

    • The tokens never leave Core Hub. They are not part of any response of the REST API, of an Automator export, including an export with Include secrets, or of a pipeline backup. The sign-in status the API returns holds no token;

    • After a restore the connection is not signed in: it has the settings of the backup and no tokens, so its status is NOT_SIGNED_IN and the agents fail with Sign-in Required. Sign in again from the restored Core Hub. A backup without secrets also masks the OAuth client secret of the app connection, which must be entered again, see Backup and restore;

    • A Core Hub that starts from a replica of the Core Hub database that lags behind the primary can hold a refresh token that Databricks has already replaced, when the app connection uses single-use refresh tokens. Its first refresh is then refused, the status becomes REAUTH_REQUIRED, and a user signs in again. On installs that keep such a standby, prefer multi-use refresh tokens for the app connection.

    Access of the signed-in user

    The pipelines run as the user, with the permissions of that user, so the access in Access the identity needs, including CAN USE on the SQL warehouse, is granted to the user or to a group the user belongs to. When the person leaves or changes role, sign in with another user, or move the connection to OAuth M2M.

    Access the identity needs

    Whatever the authentication method, the identity (the service principal, or the user the token belongs to, or the user who signed in with U2M) needs the access below, and no more. The examples grant on the schema, so the privileges apply to every table in it; grant SELECT and MODIFY on individual tables to narrow them. Replace <principal> with the identity as written in the steps of its method, and <catalog> with the value of Unity Catalog catalog.

    Where Access and what Gluesync does with it

    SQL warehouse

    CAN USE. Gluesync reads the state of the warehouse, runs every statement on it and cancels the statements that outlive their timeout. In Databricks open SQL Warehouses, select the kebab menu of the warehouse, select Permissions and add the identity with Can use. See Access control lists: SQL warehouses.

    Catalog

    USE CATALOG. Schema discovery reads <catalog>.information_schema, which lists only the objects the identity has privileges on.

    Each schema the entities write to

    USE SCHEMA.

    Each table Gluesync writes to

    SELECT and MODIFY: every batch is a MERGE, and a truncate is TRUNCATE TABLE.

    Each schema where Gluesync creates tables

    CREATE TABLE. Needed only when Gluesync creates the tables (CREATE TABLE IF NOT EXISTS …​ USING DELTA). The schema itself must already exist.

    Each table Gluesync creates, only with Publish Unity Catalog tags

    APPLY TAG. Gluesync sets the tags gluesync_managed and gluesync_version on the tables it creates.

    Staging volume, only for bulk snapshots

    READ VOLUME and WRITE VOLUME on the volume, with USE CATALOG and USE SCHEMA on its schema. Gluesync uploads the staged file with the Files API, loads it with read_files() and deletes it. With the default volume, <catalog>.gluesync_staging.bulk_files, Gluesync also runs CREATE SCHEMA IF NOT EXISTS and CREATE VOLUME IF NOT EXISTS before the first bulk load after the agent starts, so the identity needs CREATE SCHEMA and CREATE VOLUME on the catalog.

    -- Catalog and the schemas the entities write to
    GRANT USE CATALOG ON CATALOG <catalog> TO `<principal>`;
    GRANT USE SCHEMA, SELECT, MODIFY ON SCHEMA <catalog>.<schema> TO `<principal>`;
    
    -- Only when Gluesync creates the tables in that schema
    GRANT CREATE TABLE ON SCHEMA <catalog>.<schema> TO `<principal>`;
    
    -- Only with "Publish Unity Catalog tags"
    GRANT APPLY TAG ON SCHEMA <catalog>.<schema> TO `<principal>`;
    
    -- Bulk snapshots, with a staging volume you created (set it in "Staging volume for bulk snapshots")
    GRANT USE SCHEMA ON SCHEMA <catalog>.<staging_schema> TO `<principal>`;
    GRANT READ VOLUME, WRITE VOLUME ON VOLUME <catalog>.<staging_schema>.<volume> TO `<principal>`;
    
    -- Bulk snapshots, with the default staging volume that Gluesync creates
    GRANT CREATE SCHEMA, CREATE VOLUME ON CATALOG <catalog> TO `<principal>`;

    A catalog owner, a schema owner, a user with MANAGE and a metastore admin can run these statements. See Unity Catalog privileges. The staging volume rows apply only when bulk operations are enabled for a snapshot.

    Verify the connection

    Select Test and continue in the agent form, see Configure source and target connectors. The check proves that:

    • the workspace URL is reachable over HTTPS;

    • the credentials are valid: with SERVICE_PRINCIPAL Gluesync gets an OAuth token, with PAT Databricks accepts the token, with TOKEN_FEDERATION Gluesync reads the JWT and the workspace exchanges it for an access token, which proves that the federation policy matches, with ENTRA_SERVICE_PRINCIPAL Microsoft Entra issues a token for the application and the workspace accepts it, which proves that the service principal was added to the workspace, and with U2M Core Hub holds a sign-in for the connection and the workspace accepts the access token it hands out, so the check reports Sign-in Required until a user has signed in;

    • the SQL warehouse ID exists and the warehouse is not being deleted.

    It reads the state of the warehouse without starting it, so a stopped warehouse passes the check and the first statement starts it. It does not run a query, so it cannot prove the grants in Access the identity needs: they are checked when the first statements run.

    To check the grants before you start a pipeline, run queries in Query Studio on this agent: they use the same identity and warehouse as the pipeline. SELECT current_user() shows which identity Gluesync signs in as (with token federation, the service principal of the policy, and with U2M, the user who signed in), and SELECT * FROM <catalog>.<schema>.<table> LIMIT 1 on a target table needs USE CATALOG, USE SCHEMA and SELECT. Or, as a Databricks admin, run SHOW GRANTS on the catalog, schema or volume, see SHOW GRANTS.

    Troubleshooting authentication and access

    Gluesync reports these errors with a title, such as Authentication Failed, and a message. Databricks supplies the error code and the text after the colon.

    Message Cause What to do

    Authentication Failed, Databricks API returned HTTP 401 …​

    Databricks rejected the credentials. With SERVICE_PRINCIPAL: wrong or expired secret, wrong client ID, or the service principal is not in this workspace. With PAT: wrong, expired or revoked token, or a token from another workspace.

    Check the client ID and the secret, or generate a new secret or token. Check that the token comes from the workspace in Workspace URL (https://…​). For a token, check that PAT authentication is still enabled in the workspace.

    Access Denied, Databricks API returned HTTP 403 PERMISSION_DENIED: …​

    The identity is known but may not call the API: no CAN USE on the warehouse, a secret or token limited to scopes that exclude sql or files, or, for bulk snapshots, no READ VOLUME and WRITE VOLUME on the staging volume.

    Grant the access in Access the identity needs, and generate a secret with all APIs, or a token with the sql and files scopes.

    Access Denied, [INSUFFICIENT_PERMISSIONS] …​ in a statement

    The statement ran and Unity Catalog refused it: a missing USE CATALOG, USE SCHEMA, SELECT, MODIFY, CREATE TABLE or CREATE SCHEMA. Databricks names the privilege and the object in the message.

    Grant the privilege the message names to the identity on that object.

    Resource Not Found, Databricks API returned HTTP 404 RESOURCE_DOES_NOT_EXIST …​

    The SQL warehouse ID does not exist in this workspace.

    Copy the last part of the HTTP path under SQL Warehouses → Connection details of the warehouse, /sql/1.0/warehouses/<id>.

    Resource Not Found, Databricks API returned HTTP 404: …​ with an HTML or plain text body

    Workspace URL (https://…​) points at a host that is not the workspace, or at a path inside it.

    Use the address of the workspace only, for example https://dbc-1a2b3c4d-5e6f.cloud.databricks.com, without a path.

    Databricks API request failed after 5 attempts: …​

    The workspace host cannot be reached: a mistyped host name, or a firewall or proxy between Core Hub and the workspace.

    Check the host name, and that Core Hub can reach it over HTTPS on port 443.

    The Databricks workspace URL must start with https://

    Workspace URL (https://…​) is empty or starts with another protocol.

    Enter the full URL, starting with https://.

    The Databricks service principal client ID is required or The Databricks client secret or personal access token is required

    A required field is empty for the selected Authentication mode.

    Fill in Service principal client ID and Client secret or personal access token for SERVICE_PRINCIPAL, or only the token for PAT. Neither is required for TOKEN_FEDERATION.

    Federated Token Unavailable, The federated JWT file '<path>' could not be read (…​), …​ is not text or …​ is not a valid path

    Core Hub cannot read the file in Federated JWT file path: it does not exist in the Core Hub container, the process may not read it, or it is not a text file.

    Check the path as the Core Hub process sees it, for example that the volume is mounted in the Core Hub container and that the file is readable by the user Core Hub runs as.

    Federated Token Unavailable, The federated JWT environment variable '<name>' is not set or is empty in the Core Hub process

    The variable in Federated JWT environment variable does not exist in the environment of the Core Hub process, or it is empty.

    Set the variable in the environment Core Hub is started with, and start Core Hub again. Check that you wrote the name of the variable and not the token.

    Federated Token Invalid, The federated JWT from <source> is empty

    The file or the variable exists but holds nothing.

    Check what writes the token. The message names the file or the variable.

    Federated Token Invalid, The federated JWT from <source> is not a JWT: …​

    What was read is not three dot-separated segments, or the payload is not base64url JSON. Typical causes: the file holds a different value, a quoted or wrapped value, or an error page.

    Check the content of the source: it has to be the JWT alone.

    Federated Token Invalid, The federated JWT from <source> expired at <time> (<n> minutes ago)

    The exp claim of the JWT is in the past, so Gluesync did not send it. The token in the file or the variable is not being renewed, or a token you pasted has aged.

    Renew the token at its source. For a rotating token use File as the token source: it is read on every exchange. Check that the clock of the Core Hub host is correct.

    Identity Provider Error, The identity provider <URL> refused the client credentials of '<client ID>' (HTTP …​ <error>: …​)

    The identity provider rejected the request of Identity provider token URL (https://…​): wrong client ID or secret, a client that may not use the client credentials grant, or a Identity provider scope or Identity provider audience the provider does not accept.

    Check the client in the identity provider and the fields. The message carries the error and the description the provider sent, without the secret.

    Identity Provider Error, The identity provider <URL> answered without an access_token or an id_token

    The token URL answered successfully but not with a token.

    Check that Identity provider token URL (https://…​) is the token endpoint of the provider.

    Authentication Failed, Databricks refused the token exchange at <workspace URL>/oidc/v1/token (HTTP 400 invalid_grant: …​), followed by Check the federation policy: it has to match the token (issuer '…​', audience '…​', subject '…​', from <source>)

    The workspace did not find a federation policy that matches the JWT: another issuer, an audience that is not in the policy, another subject, or a policy of another kind than the one in Service principal client ID. Databricks adds its own description, and a request ID that Databricks support asks for.

    Compare the three claims in the message with the Issuer, Audiences and Subject of the policy in the account console, and check that the policy kind fits: the message ends with be an account-wide policy, since no service principal is set, or with be attached to the service principal with application ID '<id>'. Check the Subject claim of the policy too.

    Authentication Failed, Databricks refused the token exchange …​ (HTTP 401 invalid_client: …​), ending with and that service principal has to be added to the workspace

    The workspace does not know the service principal in Service principal client ID: a wrong application ID, or a service principal that is in the account but was not added to this workspace.

    Check the application ID, and add the service principal to the workspace as in OAuth token federation (NEW).

    Token Endpoint Error, Databricks refused the token exchange …​ (HTTP <status> …​) or The Databricks token exchange answered without an access token

    The workspace answered with another status, such as a 5xx, or with something that is not a token. There is no hint about the policy in these messages.

    Check Workspace URL (https://…​) and that the workspace is reachable. For a 5xx, try again later.

    Sign-in Required, Nobody is signed in to this Databricks connection: sign in from Connections (…​)

    The connection uses U2M and no user has signed in to it, the sign-in was disconnected, or it was removed because the workspace, the client ID, the client secret or the authentication mode of the connection changed. The parentheses then say The sign-in was made for another workspace or application or The connection is not set up to sign in.

    Open the connection, and select Sign in with Databricks in Databricks account, see User sign-in with OAuth U2M (NEW). After a restore of a backup, sign in again.

    Re-authentication Required, The Databricks sign-in of this connection was refused and has to be done again from Connections (<code>)

    Databricks refused the refresh token for good, with a code such as invalid_grant: the refresh token reached the end of its TTL (7 days by default), it was replaced by a newer one that this Core Hub did not save, for example on a Core Hub started from a lagging replica when the app connection uses single-use refresh tokens, or the user consent, the user or the app connection was removed in Databricks, or the client secret of the app connection changed. Core Hub also raised the warning notification Re-authentication required, which lists the pipelines that cannot get a token.

    Select Sign in again in the connection, and start the pipelines that stopped. To sign in less often, raise the refresh token TTL of the app connection or enable single-use refresh tokens, see [databricks-u2m-ttl].

    Token Endpoint Error, Core Hub could not renew the Databricks sign-in now (…​)

    Databricks answered the renewal with a temporary error, such as an HTTP 5xx or 429, or could not be reached. The sign-in is not lost: its status does not change.

    Check that Core Hub can reach the workspace over HTTPS, and try again later.

    The sign-in has to come back to this Core Hub

    The redirect address of the sign-in does not name the host your browser used to reach Core Hub, or it is a plain http:// address that is not localhost or 127.0.0.1. Behind a reverse proxy, the proxy has to send the original Host or X-Forwarded-Host header.

    Open Core Hub over HTTPS, at the address you registered in the app connection, and check what the proxy forwards.

    The sign-in window shows an error of Databricks about the redirect URL or the client

    The redirect URL shown by Databricks account is not among the redirect URLs of the app connection, or the client ID is not one of an app connection. Databricks writes the text of this page, not Gluesync.

    Register the redirect URL exactly as the control shows it, https://<core-hub-host>/connections/oauth/callback, in the app connection, and wait for Databricks to apply the change, which can take about 30 minutes. Check OAuth client ID of the app connection. If people reach Core Hub under another address, register that one too.

    Databricks refused the request (HTTP 400 invalid_client …​) or (HTTP 401 …​) in the sign-in window

    Databricks refused the code exchange: the client ID is wrong, the app connection is confidential and OAuth client secret of the app connection is empty or wrong, or the app connection is public and a secret is set.

    Compare the client ID and the secret with the Connection created values of the app connection. Leave the secret empty for a public client.

    The provider returned no refresh token: allow the offline_access scope in the app connection

    Databricks signed the user in but issued no refresh token, so Core Hub cannot renew the sign-in.

    Check that the app connection allows the offline_access scope, which Databricks allows automatically, and sign in again.

    The connection has no OAuth client ID: register an app connection in Databricks and enter its client ID or The connection has no workspace URL

    A required field of U2M is empty.

    Fill in Workspace URL (https://…​) and OAuth client ID of the app connection, and save the connection.

    The browser blocked the sign-in window. Allow pop-ups for this site and try again.

    The browser did not open the sign-in window.

    Allow pop-ups for the address of Core Hub, then select Sign in with Databricks again.

    The sign-in expired or was already used. Start it again.

    A sign-in has to be completed within 10 minutes and can be completed once. The window was open for longer, the page was reloaded, or the callback was opened twice. The same message appears after a restart of Core Hub, which forgets sign-ins that are still pending.

    Select Sign in with Databricks again and complete it without waiting.

    This sign-in was started by another user. Start it again from your own session. or Your Core Hub session has expired. Sign in to Core Hub and start the sign-in again.

    Only the Core Hub user who started the sign-in can complete it, and that user has to have a valid session and the permission to manage connections.

    Sign in to Core Hub as the user who starts the sign-in, and start it again.

    The connection was changed while you were signing in. Start it again.

    The workspace, the client ID or the client secret changed between the start and the end of the sign-in.

    Save the connection, and start the sign-in again.

    Microsoft Entra Authentication Failed, Microsoft Entra refused the token request of application '<client ID>' for tenant '<tenant ID>' (AADSTS7000215, …​): the client secret is wrong: use the secret value, not the secret ID

    The secret in Client secret or personal access token is not the client secret: typically the Secret ID was copied in place of the Value, or the value is mistyped.

    Copy the Value of the client secret in Certificates & secrets of the app registration. If it was not copied when the secret was created, create a new secret.

    Microsoft Entra Authentication Failed, …​ (AADSTS7000222, …​): the client secret has expired: create a new one for the app registration

    The secret reached its expiry date.

    Create a new client secret and enter its value, see the rotation steps in Microsoft Entra ID service principal (NEW).

    Microsoft Entra Authentication Failed, …​ (AADSTS700024, …​): the client secret has expired or is not valid yet

    The secret is past its expiry date, or its start date is still in the future.

    Create a new client secret, or check the clock of the Core Hub host.

    Microsoft Entra Authentication Failed, …​ (AADSTS700016, …​): no application with this client ID exists in the tenant: check the client ID and the tenant ID

    The application (client) ID in Service principal client ID does not belong to the tenant in Microsoft Entra tenant ID: a mistyped ID, or an app registration of another tenant.

    Compare both values with the Overview page of the app registration.

    Microsoft Entra Authentication Failed, …​ (AADSTS90002 or AADSTS900023, …​): the tenant ID is not a valid Entra directory: check it, and the authority host when the tenant is in a national cloud

    Microsoft Entra tenant ID is not a directory of the cloud that Microsoft Entra authority host (https://…​) names.

    Check the tenant ID. For a tenant in Azure Government or Microsoft Azure operated by 21Vianet, set the authority host of that cloud.

    Microsoft Entra Authentication Failed, …​ (AADSTS7000112, …​): the application is disabled in the tenant

    The service principal of the application is disabled in the tenant.

    Enable it in Microsoft Entra ID, or use another application.

    Microsoft Entra Authentication Failed, …​ (AADSTS7000218, …​): the app registration is a public client: a client secret needs a confidential client, so turn off public client flows

    The app registration allows public client flows, so Microsoft Entra does not accept a client secret for it.

    In the app registration, open Authentication and turn off Allow public client flows.

    Microsoft Entra Authentication Failed, …​ (AADSTS500011, …​): the Azure Databricks resource (2ff814a6-3304-4ab8-85cb-cd0e6f879c1d) is not available in this tenant or cloud

    Microsoft Entra does not find the Azure Databricks resource in the tenant, or in the cloud that the authority host names.

    Check Microsoft Entra tenant ID, and that Microsoft Entra authority host (https://…​) is the one of the cloud the workspace is in.

    Microsoft Entra Authentication Failed, …​ (AADSTS53003, …​): a Conditional Access policy blocks the token for this service principal

    A Conditional Access policy of the tenant applies to the service principal and blocks the request.

    Ask the Microsoft Entra administrator of the tenant to review the policy for this service principal.

    Microsoft Entra Authentication Failed, Microsoft Entra refused the token request …​ (AADSTS<code>, …​): <first line of the description> and a correlation ID

    Microsoft Entra refused the request with an error that Gluesync does not translate. The message carries the code and the first line of the description that Entra sent, never the secret.

    Look the code up in the Microsoft Entra error codes, and give the correlation ID to the Microsoft Entra administrator when you need the sign-in log entry.

    Token Endpoint Error, Microsoft Entra refused the token request …​ (HTTP <status> …​) or Microsoft Entra answered <URL> without an access token

    Microsoft Entra answered with a status that is not a client error, such as a 5xx, or with something that is not a token.

    Check Microsoft Entra authority host (https://…​) and that Core Hub can reach it over HTTPS. For a 5xx, try again later.

    Authentication Failed or Access Denied, Databricks API returned HTTP 401 or HTTP 403 …​, ending with The Microsoft Entra token was issued, so check that the service principal with application ID '<client ID>' is added to the Azure Databricks workspace …​ and can use the SQL warehouse

    Microsoft Entra issued the token, and the workspace refused it: the service principal was not added to this workspace, was added to another one, or has no CAN USE on the SQL warehouse.

    Add the service principal to the workspace as in Microsoft Entra ID service principal (NEW), check that Workspace URL (https://…​) is that workspace, and grant CAN USE on the warehouse as in Access the identity needs.

    The Microsoft Entra application (client) ID is required or The Microsoft Entra application (client) ID '<value>' is not valid: it is a GUID

    Service principal client ID is empty, or is not a GUID.

    Enter the Application (client) ID of the app registration.

    The Microsoft Entra client secret is required

    Client secret or personal access token is empty.

    Enter the client secret Value.

    The Microsoft Entra tenant ID is required or The Microsoft Entra tenant ID '<value>' is not valid: use the directory (tenant) ID, a GUID, or a verified domain name such as contoso.onmicrosoft.com

    Microsoft Entra tenant ID is empty, or is neither a GUID nor a domain name.

    Enter the Directory (tenant) ID.

    The Microsoft Entra authority host '<value>' is not valid: use an https:// URL of the host alone, such as https://login.microsoftonline.com

    Microsoft Entra authority host (https://…​) is not an https:// URL, or carries a path, a query or credentials.

    Enter the host alone, for example https://login.microsoftonline.us, or leave the default.

    The Databricks federated JWT file path is required, The Databricks federated JWT environment variable is required or The identity provider token URL of the Databricks federation is required

    The field of the selected Federated token source is empty.

    Fill in the field for the source you selected.

    The identity provider token URL of the Databricks federation must start with https://, The identity provider client ID of the Databricks federation is required or The identity provider client secret of the Databricks federation is required

    A required field of IDP_CLIENT_CREDENTIALS is empty, or the token URL is not an https:// address.

    Fill in the three fields, with an https:// token URL.

    The Databricks authentication mode '<value>' is unknown or The Databricks federated token source '<value>' is unknown

    A configuration sent with the REST API carries a value that is not one of the options.

    Use SERVICE_PRINCIPAL, PAT, TOKEN_FEDERATION, ENTRA_SERVICE_PRINCIPAL or U2M for authMode, and FILE, ENVIRONMENT_VARIABLE or IDP_CLIENT_CREDENTIALS for federationJwtSource.

    The Databricks SQL warehouse ID is required or The Unity Catalog catalog is required

    SQL warehouse ID or Unity Catalog catalog is empty.

    Fill in both fields.

    The Databricks SQL warehouse is DELETED

    The warehouse was deleted, or is being deleted.

    Choose another warehouse and enter its ID.

    Databricks statement <id> did not complete within <n> seconds and was canceled

    The statement ran longer than Statement timeout in seconds. A stopped warehouse that has to start first counts, because the connection check does not start it.

    Start the warehouse before the first run, or raise the timeout. Serverless warehouses start fastest.

    Warehouse Unavailable or Rate Limited

    The workspace answered HTTP 503, or HTTP 429.

    Gluesync retries up to five times with backoff, following Retry-After. If it keeps failing, check the state and the size of the warehouse.

    Catalog Not Found, Schema Not Found or Table Not Found

    The catalog, schema or table does not exist, or the identity cannot see it.

    Check the names in Unity Catalog catalog and in the entity mapping, and the grants in Access the identity needs.

    The staging volume must be named catalog.schema.volume, got …​

    Staging volume for bulk snapshots does not have three parts.

    Write it as catalog.schema.volume, or leave it empty for the default.

    Setup via Web UI

    • Protocol (protocol): HTTPS, the only value;

    • Workspace URL (https://…​) (host): https://<workspace-host>;, for example https://adb-1234567890123456.7.azuredatabricks.net or https://dbc-1a2b3c4d-5e6f.cloud.databricks.com. It must start with https://;

    • Port (port): 443;

    • Authentication mode (authMode): SERVICE_PRINCIPAL (default) uses OAuth machine-to-machine; PAT uses a personal access token; TOKEN_FEDERATION (NEW) exchanges a JWT of your identity provider; ENTRA_SERVICE_PRINCIPAL (NEW, Azure Databricks) uses a Microsoft Entra ID service principal; U2M (NEW) signs a user in to Databricks from Core Hub. See Authentication for the values each method takes. The form shows only the fields of the selected mode;

    • Service principal client ID (username): the OAuth client ID of the service principal. With token federation, the application ID of the service principal of a service principal federation policy, empty for an account federation policy. With ENTRA_SERVICE_PRINCIPAL, the application (client) ID of the Microsoft Entra app registration;

    • Client secret or personal access token (password): the OAuth secret of the service principal, or the personal access token. With ENTRA_SERVICE_PRINCIPAL, the client secret of the app registration. Not used with token federation or U2M. With U2M the form hides this field and the previous one;

    • SQL warehouse ID (warehouseId): the last part of the warehouse HTTP path, /sql/1.0/warehouses/<id>, under SQL Warehouses → Connection details;

    • Unity Catalog catalog (catalog): the catalog that holds the target schemas;

    • With TOKEN_FEDERATION only, see OAuth token federation (NEW):

      • Federated token source (federationJwtSource): FILE (default), ENVIRONMENT_VARIABLE or IDP_CLIENT_CREDENTIALS;

      • Federated JWT file path (federationJwtFilePath): with FILE, the path of the file that holds the JWT;

      • Federated JWT environment variable (federationJwtEnvVariable): with ENVIRONMENT_VARIABLE, the name of the variable of the Core Hub process;

      • Identity provider token URL (https://…​) (federationIdpUrl), Identity provider client ID (federationIdpClientId) and Identity provider client secret (federationIdpClientSecret): with IDP_CLIENT_CREDENTIALS, the token endpoint and the client credentials;

      • Identity provider scope (federationIdpScope) and Identity provider audience (federationIdpAudience): optional, with IDP_CLIENT_CREDENTIALS;

    • With ENTRA_SERVICE_PRINCIPAL only, see Microsoft Entra ID service principal (NEW):

    • With U2M only, see User sign-in with OAuth U2M (NEW):

      • OAuth client ID of the app connection (u2mClientId): the client ID of the custom OAuth app connection. Required;

      • OAuth client secret of the app connection (u2mClientSecret): the client secret of a confidential app connection, empty for a public one;

      • Databricks account (u2mSignIn): not a value. The form draws the sign-in control in its place: Sign in with Databricks, the redirect URL to register with a copy button, Signed in as, Disconnect, and the warning that re-authentication is required;

    • Statement timeout in seconds (statementTimeoutSeconds): default 600. A statement still running after this time is canceled on the warehouse and the write fails;

    • Staging volume for bulk snapshots (catalog.schema.volume) (stagingVolume): catalog.schema.volume of the Unity Catalog volume bulk snapshots are staged in. Empty uses <catalog>.gluesync_staging.bulk_files, which the connector creates when missing;

    • OpenLineage API secret (bearer token) (openLineageApiSecret): optional. The bearer token sent to the OpenLineage endpoint, if it asks for one. See Lineage (NEW).

    The connection check reads the state of the warehouse without starting it, so a stopped warehouse passes the check; the first statement starts it. See Verify the connection.

    Specific configuration

    • Disable truncate before snapshot (disableTruncateOnSnapshot): default false;

    • Publish Unity Catalog tags (publishUnityCatalogTags): default false. NEW: when on, Gluesync sets the Unity Catalog tags gluesync_managed and gluesync_version on every table it creates. See Unity Catalog metadata;

    • Publish lineage to Unity Catalog (Public Preview) (publishUnityCatalogLineage): NEW. Default false. See Lineage (NEW);

    • OpenLineage endpoint URL (https://…​) (openLineageUrl): NEW. Optional. Empty, the default, sends no OpenLineage events;

    • OpenLineage namespace (openLineageNamespace): NEW. Optional, default gluesync.

    Per entity:

    • Rows per bulk snapshot load (bulkSnapshotFileRows): default 1000000. Used only when bulk operations are enabled for the snapshot;

    • Maximum rows per MERGE statement (maxRowsPerStatement): default 1000. A statement is also cut before it reaches 3,000,000 characters, well below the 16 MiB a Databricks statement may take. Raise it for large snapshots;

    • SQL pre/post snapshot and CDC commands: SQL run on the warehouse around the snapshot and the CDC of the entity.

    Writes

    Every batch is applied as Delta MERGE statements:

    • Inserts and updates: MERGE … WHEN MATCHED THEN UPDATE SET … WHEN NOT MATCHED THEN INSERT …. Rows are matched null-safely (<⇒) on the key they had before the change, so an update that changes the key moves the row instead of inserting a second one;

    • Deletes: MERGE … WHEN MATCHED THEN DELETE;

    • Truncate, and the first snapshot batch unless Disable truncate before snapshot is set: TRUNCATE TABLE on every table of the entity.

    A Delta MERGE fails when two source rows match the same target row, and a CDC batch can change a row many times. Gluesync therefore keeps the order of the changes and cuts them into statements in which every key appears once: a later image of a row replaces the earlier one when both carry the same columns, and a key change or a different set of columns starts a new statement. The last change of a row is always the one left on the table.

    Delta enforces no primary key, so an insert never fails on a duplicate: the insert conflict strategy has no effect on this target.

    Rate limiting (HTTP 429), an unavailable warehouse (HTTP 502–504) and dropped connections are retried up to five times with backoff, following Retry-After. A revoked OAuth token is replaced once. Every statement the connector writes can run twice without changing the result; pre/post commands you write should be idempotent too.

    Bulk snapshots

    Enable bulk operations while snapshot on an entity to load its snapshot in bulk: the rows are staged in a file and loaded from a Unity Catalog volume with one MERGE per load (every Rows per bulk snapshot load rows, and at the end of the snapshot), instead of one MERGE per transaction. Gluesync confirms the staged transactions only once they are loaded, so a restart sends them again and they are written once. CDC and multi-table entities always use the per-transaction MERGE.

    The identity needs READ VOLUME and WRITE VOLUME on the staging volume, or CREATE SCHEMA and CREATE VOLUME on the catalog for the connector to create the default one. Staged files are deleted after each load.

    Tables Gluesync generates

    CREATE TABLE IF NOT EXISTS <catalog>.<schema>.<table> (…) USING DELTA COMMENT '…' TBLPROPERTIES (…). The key columns are NOT NULL and become an informational PRIMARY KEY constraint named pk_<table>: Delta does not enforce it, but schema discovery reads it back, so the key is found again when an entity is mapped onto the table.

    Unity Catalog metadata

    NEW: the tables Gluesync creates are published in Unity Catalog with metadata that says they are replicated by Gluesync.

    Gluesync writes:

    • Table comment: Replicated by MOLO17 Gluesync;

    • Column comments: when the source gives a column a description, it becomes the comment of that column in Databricks. A column the source does not describe has no comment;

    • Table properties: gluesync.managed = true, and gluesync.version = the Gluesync release that created the table, for example 2.3.1.1;

    • Tags, only when Publish Unity Catalog tags is on: gluesync_managed = true and gluesync_version = the same release. Unity Catalog does not accept a dot in a tag key, so the tag keys use an underscore where the table properties use a dot.

    The comment, column comments and properties are part of the CREATE TABLE IF NOT EXISTS statement. The tags are set right after the table is created.

    Existing tables are left as they are

    The metadata is written only to a table that Gluesync creates. A table that already exists keeps its own comment, column comments, properties and tags, whoever wrote them: Gluesync does not overwrite them, add to them or tag the table. Before it creates a table with the option on, Gluesync checks whether the table already exists; when it cannot tell, it leaves the tags unset and logs a warning.

    Publish Unity Catalog tags

    Turn it on in the Specific configuration of the Databricks target agent, under Publish Unity Catalog tags (publishUnityCatalogTags). It is off by default, and it applies to the tables Gluesync creates from then on: a table created while it was off is not tagged afterwards.

    Setting tags takes APPLY TAG on the table, together with USE SCHEMA on its schema and USE CATALOG on its catalog. When setting the tags fails, the pipeline keeps running and the table stays created with its comment, column comments and properties: Gluesync logs a warning that names the table and these privileges.

    Check the metadata

    Run these in the Databricks SQL editor, or in Query Studio:

    -- Table comment (the "Comment" row) and column comments
    DESCRIBE TABLE EXTENDED <catalog>.<schema>.<table>;
    
    -- gluesync.managed and gluesync.version
    SHOW TBLPROPERTIES <catalog>.<schema>.<table>;
    
    -- gluesync_managed and gluesync_version, when the tags are on
    SELECT tag_name, tag_value
    FROM <catalog>.information_schema.table_tags
    WHERE schema_name = '<schema>' AND table_name = '<table>';

    Tables you create

    Any Delta table in the catalog can be a target. Schemas, tables (data_source_format = 'DELTA') and columns are read from <catalog>.information_schema; a column is a key when the table declares a PRIMARY KEY constraint on it, otherwise the key comes from the entity mapping.

    Columns are mapped explicitly: a column the change carries and the table lacks fails the write with UNRESOLVED_COLUMN instead of being added.

    How Gluesync identifies itself

    Every request the agent sends to Databricks carries the User-Agent MOLO17_Gluesync/<version>, where <version> is the Gluesync release. Databricks uses it to attribute the traffic: the Source column of the SQL warehouse query history shows MOLO17_Gluesync, and the user_agent column of the system.access.audit system table holds the full value. To list Gluesync’s activity:

    SELECT event_time, action_name, user_identity.email, user_agent
    FROM system.access.audit
    WHERE lower(user_agent) LIKE '%molo17_gluesync%'
      AND event_time > now() - INTERVAL 2 DAYS
    ORDER BY event_time DESC;

    Data types

    Every value is written as a literal cast to the type of its column. Timestamps have microsecond precision.

    Gluesync type Default Databricks type Notes

    SHORT

    SMALLINT

    Alternatives: TINYINT, INT, BIGINT.

    INT

    INT

    Alternative: BIGINT.

    LONG

    BIGINT

    Alternative: DECIMAL.

    FLOAT

    FLOAT

    Alternative: DOUBLE. NaN and infinities are kept.

    DOUBLE

    DOUBLE

    NaN and infinities are kept.

    BIG_DECIMAL

    DECIMAL(p, s)

    Precision and scale come from the source, up to 38 digits. An unsized decimal is DECIMAL(38, 18). Alternatives: DOUBLE, and STRING for wider values, written in plain notation.

    BOOLEAN

    BOOLEAN

    STRING

    STRING

    Alternative: VARIANT, parsed from the JSON text.

    BYTE_ARRAY

    BINARY

    Alternative: STRING, as Base64.

    LOCAL_DATE

    DATE

    Alternatives: TIMESTAMP_NTZ, STRING.

    LOCAL_TIME

    STRING

    Databricks has no time-of-day type. Text HH:mm:ss.SSSSSS.

    OFFSET_TIME

    STRING

    Text HH:mm:ss.SSSSSS+HH:MM.

    LOCAL_DATE_TIME

    TIMESTAMP_NTZ

    Wall-clock time, as the source has it. Alternatives: TIMESTAMP, STRING.

    OFFSET_DATE_TIME

    TIMESTAMP

    Stored as an instant and shown in the session time zone. Alternative: STRING, in UTC.

    ARRAY

    STRING

    The JSON text of the array. Alternatives: ARRAY<…>, filled with from_json using the column’s element type, and VARIANT. A generated native column is ARRAY<STRING>.

    MAP

    STRING

    The JSON text of the map. Alternatives: MAP<…> and VARIANT. A generated native column is MAP<STRING, STRING>.

    Query Studio and data comparison

    The agent is SQL-capable: Query Studio runs queries on the configured SQL warehouse and catalog, and data comparison reads the target tables through it. The same identity and warehouse as the pipeline are used.

    • Each query runs on its own through the Statement Execution API, which keeps no session between statements: there are no manual transactions and no session settings. In read-only mode a query must be a single read (SELECT, WITH, SHOW, DESCRIBE, EXPLAIN) before it is sent.

    • Names are quoted with backticks and strings escape with backslashes ('it's'), as Databricks SQL reads them.

    • Write values into the SQL: the Statement Execution API binds named markers only, so Query Studio parameters are refused.

    • Explain shows the EXPLAIN text plan, and the DDL viewer shows SHOW CREATE TABLE.

    • A cancelled query, or one that outlives its timeout, is cancelled on the warehouse too. A write is sent only once: a submission that may have reached the warehouse is not retried, except after rate limiting.

    • The Statement Execution API returns timestamps with millisecond precision, so the result grid shows milliseconds. Cast a column to STRING to see its microseconds. Data comparison reads timestamps as text with every microsecond, so it compares them in full.

    Lineage (NEW)

    Gluesync can tell your data catalog where each Delta table comes from. For every entity of a pipeline it publishes the link from the source table to the table in Unity Catalog, with the column mapping, to two destinations. Each one has its own setting and both are off by default:

    • Unity Catalog external lineage, so the source shows in the lineage graph of the Delta table in Catalog Explorer;

    • OpenLineage events, sent to an endpoint of your choice, for catalogs that read OpenLineage.

    Gluesync publishes when an entity starts, once per entity for each run of the agent, whether the snapshot or the CDC starts first. An entity that reads from a query maps no table, so it has no lineage to publish. The information about the source (the agent type, host, port and database of the source connection) comes from Core Hub; credentials are never part of it.

    Publishing runs in the background, with a time limit and one attempt. If it fails, for example because a privilege is missing or the endpoint does not answer, Gluesync writes one warning to the log that says what is missing, and replication carries on unaffected.

    Unity Catalog (Public Preview)

    Enable Publish lineage to Unity Catalog (Public Preview) in the specific configuration of the pipeline. Databricks lists the External Metadata and External Lineage APIs this option uses as Public Preview, so the feature depends on your workspace having them. Gluesync then does the following for each source table of the entity:

    1. It creates an external metadata object that stands for the source table, or reuses the one it finds. The object is named gs_<scheme>_<host>_<database>_<schema>_<table>_<hash>: the readable part is lowercased and cleaned of characters that names do not take, and the 8-character hash at the end is computed from the exact source identity, so two different tables never share an object. Its system_type follows the source agent: POSTGRESQL, MICROSOFT_SQL_SERVER, ORACLE, MYSQL, SNOWFLAKE, GOOGLE_BIGQUERY, AMAZON_REDSHIFT, MONGODB, KAFKA or SAP. A source with no matching type, such as MariaDB, Db2 LUW or Cassandra, uses OTHER. The object carries the entity type table, the names of the source columns, and properties that name the source agent, location, database, schema and table;

    2. It creates the lineage relationship from that object to <catalog>.<schema>.<table> of the Delta table, with the mapping of each source column to its target column and properties that name the pipeline and the entity.

    Both steps look first and create only what is missing, so running the same entity again creates nothing new.

    Required privileges

    The identity of the agent needs, on top of the prerequisites above:

    • CREATE EXTERNAL METADATA on the metastore, to create the external metadata objects;

    • MODIFY on each external metadata object, to link it to a table;

    • MODIFY on the target table, which the identity already has to write to it.

    GRANT CREATE EXTERNAL METADATA ON METASTORE TO `gluesync-service-principal`;
    GRANT MODIFY ON EXTERNAL METADATA `<external-metadata-object-name>` TO `gluesync-service-principal`;
    GRANT MODIFY ON TABLE <catalog>.<schema>.<table> TO `gluesync-service-principal`;

    When a privilege is missing, the warning in the log names it.

    Where to see it

    Open the Delta table in Catalog Explorer and go to the Lineage tab: the source table shows upstream of it, and the external metadata objects are listed under Catalog > External data > External Metadata. The relationships can also be listed with the External Lineage API, GET /api/2.0/lineage-tracking/external-lineage, with object_info.table.name=<catalog>.<schema>.<table> and lineage_direction=UPSTREAM.

    Databricks records external lineage apart from the lineage it captures itself: it does not appear in system.access.table_lineage or system.access.column_lineage. A metastore holds up to 10,000 external metadata objects and 100,000 external lineage relationships. See the Databricks documentation on external lineage.

    OpenLineage

    Databricks does not read OpenLineage events, so this option is for the catalogs that do, such as Marquez. Set:

    • OpenLineage endpoint URL (https://…​) (openLineageUrl): where the events are posted. It must start with https://; http:// is accepted for localhost only, and the URL must not contain credentials. An address with no path, such as a Marquez server, takes the standard path /api/v1/lineage. Empty sends nothing;

    • OpenLineage API secret (bearer token) (openLineageApiSecret): optional, in the connection credentials. When set, it is sent as an Authorization: Bearer header and is never written to the log;

    • OpenLineage namespace (openLineageNamespace): the namespace of the job. Default gluesync.

    Gluesync sends OpenLineage run events:

    • START, when the entity starts;

    • COMPLETE, when the snapshot of the entity completes. The CDC of an entity runs without end, so a run that has only CDC sends START alone.

    Both events of a run share one run id and reach the endpoint in order. The job is named <pipeline name>.<entity name>, with the jobType facet (BATCH for a run that starts with the snapshot, STREAMING for one that starts with the CDC). The events follow the OpenLineage dataset naming:

    Dataset Namespace Name

    Input: the source table

    <scheme>://<host>:<port> of the source, for example postgres://pg-host:5432

    <database>.<schema>.<table>, or <schema>.<table> for the engines whose entry names no database

    Output: the Delta table

    unitycatalog://<workspace host>

    <catalog>.<schema>.<table>

    Every input and output carries the schema facet with its columns and types, and every output the columnLineage facet that says which source columns feed each target column. Gluesync makes one attempt per event and gives it up after 15 seconds; an answer other than success logs a warning that names the HTTP status.

    Setup via Rest APIs

    Here following an example of calling the Core Hub’s Rest API via curl to setup the connection for this Agent.

    Connect the agent

    curl --location --request PUT 'http://core-hub-ip-address/pipelines/{pipelineId}/agents/{agentId}/config/credentials' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: ••••••' \
    --data '{
            "hostCredentials": {
            "connectionName": "myAgentNickName",
            "host": "https://dbc-1a2b3c4d-5e6f.cloud.databricks.com",
            "port": 443,
            "username": "",
            "password": "",
            "maxConnectionsCount": 1,
            "enableTls": true
          },
          "customHostCredentials": {
            "authMode": "SERVICE_PRINCIPAL",
            "warehouseId": "1a2b3c4d5e6f7a8b",
            "catalog": "main",
            "statementTimeoutSeconds": 600,
            "stagingVolume": "",
            "openLineageApiSecret": ""
          }
    }'

    authMode is SERVICE_PRINCIPAL, PAT or, NEW, TOKEN_FEDERATION, ENTRA_SERVICE_PRINCIPAL or U2M. With SERVICE_PRINCIPAL, username is the client ID and password the OAuth secret; with PAT, password is the personal access token. port is 443, statementTimeoutSeconds defaults to 600, and an empty stagingVolume uses <catalog>.gluesync_staging.bulk_files. openLineageApiSecret is optional: set it only when the OpenLineage endpoint needs a bearer token. The lineage options themselves, publishUnityCatalogLineage, openLineageUrl and openLineageNamespace, are in the specific configuration of the pipeline.

    Connect the agent with OAuth token federation (NEW)

    With authMode set to TOKEN_FEDERATION, password is not used. username is the application ID of the service principal of a service principal federation policy, and empty for an account federation policy. These keys of customHostCredentials select where the JWT comes from:

    Key Value

    federationJwtSource

    FILE (default), ENVIRONMENT_VARIABLE or IDP_CLIENT_CREDENTIALS.

    federationJwtFilePath

    With FILE: the path of the file that holds the JWT, as the Core Hub process sees it.

    federationJwtEnvVariable

    With ENVIRONMENT_VARIABLE: the name of the environment variable of the Core Hub process.

    federationIdpUrl, federationIdpClientId, federationIdpClientSecret

    With IDP_CLIENT_CREDENTIALS: the https:// token URL of the identity provider, and the client ID and the client secret Gluesync signs in with. Core Hub returns <hidden> in place of the secret when it shows the configuration.

    federationIdpScope, federationIdpAudience

    With IDP_CLIENT_CREDENTIALS, optional: sent to the identity provider when they are set.

    The keys of the sources you do not use can be left out. This example reads the JWT from a file that Kubernetes keeps up to date, with a service principal federation policy:

    curl --location --request PUT 'http://core-hub-ip-address/pipelines/{pipelineId}/agents/{agentId}/config/credentials' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: ••••••' \
    --data '{
            "hostCredentials": {
            "connectionName": "myAgentNickName",
            "host": "https://dbc-1a2b3c4d-5e6f.cloud.databricks.com",
            "port": 443,
            "username": "<service-principal-application-id>",
            "password": "",
            "maxConnectionsCount": 1,
            "enableTls": true
          },
          "customHostCredentials": {
            "authMode": "TOKEN_FEDERATION",
            "warehouseId": "1a2b3c4d5e6f7a8b",
            "catalog": "main",
            "statementTimeoutSeconds": 600,
            "stagingVolume": "",
            "federationJwtSource": "FILE",
            "federationJwtFilePath": "/var/run/secrets/databricks/token"
          }
    }'

    For an identity provider, set "federationJwtSource": "IDP_CLIENT_CREDENTIALS" and replace the file path with the federationIdp…​ keys.

    Connect the agent with a Microsoft Entra ID service principal (NEW)

    With authMode set to ENTRA_SERVICE_PRINCIPAL, username is the application (client) ID of the Microsoft Entra app registration and password is its client secret. These keys of customHostCredentials say where Microsoft Entra is asked for the token:

    Key Value

    entraTenantId

    The directory (tenant) ID, a GUID, or a verified domain name such as contoso.onmicrosoft.com. Required.

    entraAuthorityHost

    The https:// sign-in host of the cloud the tenant is in, with no path. Optional: the default is https://login.microsoftonline.com. For a national cloud, https://login.microsoftonline.us or https://login.partner.microsoftonline.cn.

    curl --location --request PUT 'http://core-hub-ip-address/pipelines/{pipelineId}/agents/{agentId}/config/credentials' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: ••••••' \
    --data '{
            "hostCredentials": {
            "connectionName": "myAgentNickName",
            "host": "https://adb-1234567890123456.7.azuredatabricks.net",
            "port": 443,
            "username": "<application-client-id>",
            "password": "<client-secret-value>",
            "maxConnectionsCount": 1,
            "enableTls": true
          },
          "customHostCredentials": {
            "authMode": "ENTRA_SERVICE_PRINCIPAL",
            "warehouseId": "1a2b3c4d5e6f7a8b",
            "catalog": "main",
            "statementTimeoutSeconds": 600,
            "stagingVolume": "",
            "entraTenantId": "<directory-tenant-id>",
            "entraAuthorityHost": "https://login.microsoftonline.com"
          }
    }'

    Connect the agent with a user sign-in, OAuth U2M (NEW)

    A sign-in belongs to a connection, so with authMode set to U2M you create a connection, sign in to it, and attach it to the agent. username and password are not used. These keys of customHostCredentials name the app connection:

    Key Value

    u2mClientId

    The client ID of the custom OAuth app connection. Required.

    u2mClientSecret

    The client secret of a confidential app connection. Leave it out for a public one. Core Hub returns <hidden> in place of it when it shows the configuration.

    1. Create the connection with the permission to manage connections:

      curl --location --request POST 'http://core-hub-ip-address/connections' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: ••••••' \
      --data '{
              "name": "databricks-alice",
              "agentTag": "databricks",
              "hostCredentials": {
              "connectionName": "databricks-alice",
              "host": "https://dbc-1a2b3c4d-5e6f.cloud.databricks.com",
              "port": 443,
              "username": "",
              "password": "",
              "maxConnectionsCount": 1,
              "enableTls": true
            },
            "customHostCredentials": {
              "authMode": "U2M",
              "warehouseId": "1a2b3c4d5e6f7a8b",
              "catalog": "main",
              "statementTimeoutSeconds": 600,
              "stagingVolume": "",
              "u2mClientId": "<app-connection-client-id>",
              "u2mClientSecret": ""
            }
      }'
    2. Sign in to it. The sign-in needs a browser, so a script starts it and hands the address to a person. The routes are below. POST /connections/{connectionId}/oauth/start takes the callback of Core Hub as the browser reaches it, and answers the address to open:

      curl --location --request POST 'https://core-hub-host/connections/{connectionId}/oauth/start' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: ••••••' \
      --data '{ "redirectUri": "https://core-hub-host/connections/oauth/callback" }'

      The answer is {"authorizationUrl": "https://dbc-1a2b3c4d-5e6f.cloud.databricks.com/oidc/v1/authorize?…​"}. The person opens it in the browser in which they are signed in to Core Hub, signs in to Databricks, and Databricks sends the browser back to redirectUri. The callback has to be completed by the Core Hub user who started the sign-in.

    3. Attach the connection to the agent:

      curl --location --request PUT 'http://core-hub-ip-address/pipelines/{pipelineId}/agents/{agentId}/config/connection' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: ••••••' \
      --data '{ "connectionId": "<connection-id>" }'

    The sign-in has four routes under the connections routes:

    Route What it does

    GET /connections/{connectionId}/oauth

    Answers the status of the sign-in, with no token. Any user who can read connections can call it. redirectUri is the callback address as the request reached Core Hub, which is what to register in the app connection.

    POST /connections/{connectionId}/oauth/start

    Starts a sign-in, with the body {"redirectUri": "<callback>"}, and answers {"authorizationUrl": "…​"}. Needs the permission to manage connections. The redirectUri has to end with /connections/oauth/callback, name the host of the request (Host or X-Forwarded-Host), and use https://, or http:// on localhost or 127.0.0.1. The state of the sign-in is valid for 10 minutes and can be used once.

    GET /connections/oauth/callback

    The address Databricks sends the browser back to, with code and state. It answers a page for the sign-in window, never JSON, and needs the Core Hub session of the user who started the sign-in. It completes a sign-in, so an API token that can only read cannot call it.

    DELETE /connections/{connectionId}/oauth

    Disconnects: removes the sign-in, and answers 204. Needs the permission to manage connections.

    The status is the same object that the connection carries as signIn in GET /connections and GET /connections/{connectionId}, without redirectUri:

    {
      "supported": true,
      "provider": "databricks",
      "status": "SIGNED_IN",
      "identity": { "name": "Jane Doe", "email": "jane@acme.com" },
      "workspace": "https://dbc-1a2b3c4d-5e6f.cloud.databricks.com",
      "signedInAt": 1767000000000,
      "signedInBy": "admin",
      "lastRefreshedAt": 1767003600000,
      "reason": null,
      "redirectUri": "https://core-hub-host/connections/oauth/callback"
    }

    status is NOT_SIGNED_IN, SIGNED_IN or REAUTH_REQUIRED. signedInAt and lastRefreshedAt are Unix times in milliseconds, signedInBy is the Core Hub user who signed in, and reason is a short sentence when the status is REAUTH_REQUIRED. Fields that do not apply are left out or null. A connection that is not set up to sign in answers {"supported": false}. No route returns a token.

    Not covered in this release

    • Databricks as a source (Change Data Feed), Partner Connect and Marketplace packaging;

    • Schema evolution.