<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Databricks Federated Token Exchange Returns HTML Login Page Instead of Access Token(GCP →Databricks) in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/databricks-federated-token-exchange-returns-html-login-page/m-p/140254#M4538</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m trying to implement federated authentication (token exchange) from Google Cloud → Databricks without using a client ID / client secret only using a Google-issued service account token. I have also created a federation policy in Databricks.&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GeraldBriyolan_0-1764050266136.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/21939iD9A61D5B7D525EF2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GeraldBriyolan_0-1764050266136.png" alt="GeraldBriyolan_0-1764050266136.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const audience = "https://accounts.gcp.databricks.com";

const resp = await axios.post(
"https://accounts.gcp.databricks.com",
qs.stringify({
grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
subject_token: accessToken,
subject_token_type: "urn:ietf:params:oauth:token-type:jwt",
audience,
requested_token_type: "urn:ietf:params:oauth:token-type:access_token",
}),
{ headers: { "Content-Type": "application/x-www-form-urlencoded" } }
);&lt;/LI-CODE&gt;&lt;P data-unlink="true"&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;Which API should i use instead of "https://accounts.gcp.databricks.com"?&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!doctype html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta charset="utf-8"&amp;gt;
&amp;lt;meta name="viewport" content="width=device-width,initial-scale=1"&amp;gt;
&amp;lt;meta name="description" content="Databricks Sign in"&amp;gt;
&amp;lt;title&amp;gt;Databricks - Sign in&amp;lt;/title&amp;gt;
...
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;H3&gt;&lt;BR /&gt;Can anyone help me to solve this error or provide any document for this&amp;nbsp;Federated Token Exchange (GCP →Databricks).&lt;/H3&gt;</description>
    <pubDate>Tue, 25 Nov 2025 06:00:14 GMT</pubDate>
    <dc:creator>GeraldBriyolan</dc:creator>
    <dc:date>2025-11-25T06:00:14Z</dc:date>
    <item>
      <title>Databricks Federated Token Exchange Returns HTML Login Page Instead of Access Token(GCP →Databricks)</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-federated-token-exchange-returns-html-login-page/m-p/140254#M4538</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m trying to implement federated authentication (token exchange) from Google Cloud → Databricks without using a client ID / client secret only using a Google-issued service account token. I have also created a federation policy in Databricks.&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GeraldBriyolan_0-1764050266136.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/21939iD9A61D5B7D525EF2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GeraldBriyolan_0-1764050266136.png" alt="GeraldBriyolan_0-1764050266136.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const audience = "https://accounts.gcp.databricks.com";

const resp = await axios.post(
"https://accounts.gcp.databricks.com",
qs.stringify({
grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
subject_token: accessToken,
subject_token_type: "urn:ietf:params:oauth:token-type:jwt",
audience,
requested_token_type: "urn:ietf:params:oauth:token-type:access_token",
}),
{ headers: { "Content-Type": "application/x-www-form-urlencoded" } }
);&lt;/LI-CODE&gt;&lt;P data-unlink="true"&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;Which API should i use instead of "https://accounts.gcp.databricks.com"?&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!doctype html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta charset="utf-8"&amp;gt;
&amp;lt;meta name="viewport" content="width=device-width,initial-scale=1"&amp;gt;
&amp;lt;meta name="description" content="Databricks Sign in"&amp;gt;
&amp;lt;title&amp;gt;Databricks - Sign in&amp;lt;/title&amp;gt;
...
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;H3&gt;&lt;BR /&gt;Can anyone help me to solve this error or provide any document for this&amp;nbsp;Federated Token Exchange (GCP →Databricks).&lt;/H3&gt;</description>
      <pubDate>Tue, 25 Nov 2025 06:00:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-federated-token-exchange-returns-html-login-page/m-p/140254#M4538</guid>
      <dc:creator>GeraldBriyolan</dc:creator>
      <dc:date>2025-11-25T06:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Federated Token Exchange Returns HTML Login Page Instead of Access Token(GCP →Databri</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-federated-token-exchange-returns-html-login-page/m-p/140354#M4546</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/198706"&gt;@GeraldBriyolan&lt;/a&gt;,&lt;BR /&gt;Maybe this documentation can help you:&lt;BR /&gt;&lt;A href="https://docs.databricks.com/gcp/en/dev-tools/auth/authentication-google-id" target="_blank"&gt;https://docs.databricks.com/gcp/en/dev-tools/auth/authentication-google-id&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Nov 2025 01:02:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-federated-token-exchange-returns-html-login-page/m-p/140354#M4546</guid>
      <dc:creator>WiliamRosa</dc:creator>
      <dc:date>2025-11-26T01:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Federated Token Exchange Returns HTML Login Page Instead of Access Token(GCP →Databri</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-federated-token-exchange-returns-html-login-page/m-p/140476#M4554</link>
      <description>&lt;P&gt;I have tried using this document I got the access token (been authenticated from databricks) but when i tried to use it to get the users or the workspace it shows error.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      const auth = new GoogleAuth();
      const idTokenClient = await auth.getIdTokenClient(audience);
      const headers = await idTokenClient.getRequestHeaders();
      const oidc_token = headers.Authorization.replace('Bearer ', '');

      const token_exchange_url = `https://2153434890.0.gcp.databricks.com/oidc/v1/token`;
      const formData = new URLSearchParams({
        grant_type: 'urn:ietf:params:oauth:grant-type:token-exchange',
        requestedTokenType: 'urn:ietf:params:oauth:token-type:access_token',
        subject_token: oidc_token,
        subject_token_type: 'urn:ietf:params:oauth:token-type:jwt',
        scope: 'all-apis',
      });

      const response = await axios.post(token_exchange_url, formData, {
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
        timeout: 30000,
      });

      const access_token = response.data.access_token;

      if (!accessToken) return { success: false, message: 'Invalid Credentials' };

      const api = `https://accounts.gcp.databricks.com/api/2.0/accounts/${databricksAccountId}/workspaces`;
      const headers = {
        Authorization: `Bearer ${accessToken}`,
        'Content-Type': 'application/json',
      };

      const response = await axios.get(api, {
        headers,
        timeout: 15000, 
      });

      const workspaces = await response.data.map((workspace) =&amp;gt; {
        return {
          workspaceId: workspace.workspace_id,
          workspaceName: workspace.workspace_name,
          regionName: workspace.location,
          workspaceUrl: `${workspace.deployment_name}.gcp.databricks.com`,
          workspaceTier: workspace.pricing_tier,
        };
      });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I have attached the code if i am done any mistake in the code kindly lent me know and tell me a solution for this issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Nov 2025 04:19:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-federated-token-exchange-returns-html-login-page/m-p/140476#M4554</guid>
      <dc:creator>GeraldBriyolan</dc:creator>
      <dc:date>2025-11-27T04:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Federated Token Exchange Returns HTML Login Page Instead of Access Token(GCP →Databri</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-federated-token-exchange-returns-html-login-page/m-p/140547#M4556</link>
      <description>&lt;P&gt;You might want to check whether the issue is related to your federation policy configuration.&lt;/P&gt;&lt;P&gt;Try reviewing the following documentation to confirm that your policy is correctly set up (issuer, audiences, and other expected claims):&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/gcp/en/dev-tools/auth/oauth-federation-policy" target="_blank"&gt;https://docs.databricks.com/gcp/en/dev-tools/auth/oauth-federation-policy&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Nov 2025 19:16:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-federated-token-exchange-returns-html-login-page/m-p/140547#M4556</guid>
      <dc:creator>WiliamRosa</dc:creator>
      <dc:date>2025-11-27T19:16:28Z</dc:date>
    </item>
  </channel>
</rss>

