<?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 Re: External embedding for reports using federated credentials fails in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/external-embedding-for-reports-using-federated-credentials-fails/m-p/153661#M2552</link>
    <description>&lt;P&gt;I've also come across this issue and keen to see what the solution was.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;When you experience this issue, did you have a federation policy configured?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Apr 2026 23:15:41 GMT</pubDate>
    <dc:creator>Eugene_229</dc:creator>
    <dc:date>2026-04-07T23:15:41Z</dc:date>
    <item>
      <title>External embedding for reports using federated credentials fails</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/external-embedding-for-reports-using-federated-credentials-fails/m-p/140624#M2384</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are implementing external dashboard embedding in Azure Databricks and want to avoid using client secrets by leveraging **Azure Managed Identity** with **OAuth token federation** for generating the embedded report token.&lt;/P&gt;&lt;P&gt;Following OAuth token federation documentation, we successfully obtain an AAD token using:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;credential = ManagedIdentityCredential(client_id=CONFIG['service_principal_id'])
aad_token_res = credential.get_token("api://AzureADTokenExchange/.default")
aad_token = aad_token_res.token&lt;/LI-CODE&gt;&lt;P&gt;Then, we exchange this token for a Databricks **all-apis** token using:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;federated_params = {
"grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
"client_id": CONFIG["service_principal_id"],
"subject_token": aad_token,
"subject_token_type": "urn:ietf:params:oauth:token-type:jwt",
"scope": "all-apis"
}&lt;/LI-CODE&gt;&lt;P&gt;Next, we call `/published/tokeninfo` with `external_viewer_id` and `external_value` to retrieve `authorization_details` and `custom_claim`. This step works as expected and returns the same data as when using Basic Auth with a service principal secret.&lt;/P&gt;&lt;P&gt;However, when we perform the **scoped token exchange** using OAuth federation:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;scoped_params = {
"grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
"client_id": "&amp;lt;Databricks SP UUID&amp;gt;",
"custom_claim": "urn:aibi:external_data:testss:test:DASHBOARD_ID",
"subject_token": aad_token,
"subject_token_type": "urn:ietf:params:oauth:token-type:jwt",
"authorization_details": json.dumps(token_info["authorization_details"]),
}&lt;/LI-CODE&gt;&lt;P&gt;The resulting JWT **does not include the `custom.claim`**. It only contains `authorization_details` and `scope`. In contrast, when using Basic Auth + SP secret, the scoped token includes:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"custom": {
"claim": "urn:aibi:external_data:&amp;lt;external_value&amp;gt;:&amp;lt;external_viewer_id&amp;gt;:&amp;lt;dashboard_id&amp;gt;"
}&lt;/LI-CODE&gt;&lt;P&gt;Without this claim, embedding fails with:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"message":"BAD_REQUEST","name":"Dashboard ID is missing in token claim."}&lt;/LI-CODE&gt;&lt;H3&gt;Question&lt;/H3&gt;&lt;P&gt;Is this a known limitation of the current public preview for OAuth token federation? If so, is there an ETA for supporting **custom claim injection** in scoped tokens for external embedding?&lt;/P&gt;&lt;H4&gt;Code Summary (Federation Flow):&lt;/H4&gt;&lt;LI-CODE lang="python"&gt;scoped_params = {
"grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
"client_id": "&amp;lt;Databricks SP UUID&amp;gt;",
"custom_claim": "urn:aibi:external_data:testss:test:DASHBOARD_ID",
"subject_token": aad_token, # MI token for api://AzureADTokenExchange/.default
"subject_token_type": "urn:ietf:params:oauth:token-type:jwt",
"authorization_details": json.dumps(token_info["authorization_details"]),
}

response = [requests.post](
f"{instance_url}/oidc/v1/token",
headers={"Content-Type": "application/x-www-form-urlencoded"},
data=scoped_params
)&lt;/LI-CODE&gt;&lt;H4&gt;Decoded JWT (Federation):&lt;/H4&gt;&lt;LI-CODE lang="markup"&gt;{
"client_id": "…",
"scope": "…",
...
"authorization_details": […]
}&lt;/LI-CODE&gt;&lt;H4&gt;Decoded JWT (Basic Auth):&lt;/H4&gt;&lt;LI-CODE lang="markup"&gt;{
"custom": {
"claim": "urn:aibi:external_data:testss:test:&amp;lt;dashboard_id&amp;gt;"
},
"client_id": "…",
"scope": "…",
"authorization_details": […]
...
}&lt;/LI-CODE&gt;&lt;H4&gt;References:&lt;/H4&gt;&lt;P&gt;- [Embedding dashboards for external users](&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dashboards/embedding/external-embed" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/azure/databricks/dashboards/embedding/external-embed&lt;/A&gt;)&lt;BR /&gt;- [OAuth token federation overview](&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/auth/oauth-federation" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/azure/databricks/dev-tools/auth/oauth-federation&lt;/A&gt;)&lt;BR /&gt;- [Configure federation policy](&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/auth/oauth-federation-policy" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/azure/databricks/dev-tools/auth/oauth-federation-policy&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 18:57:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/external-embedding-for-reports-using-federated-credentials-fails/m-p/140624#M2384</guid>
      <dc:creator>iamgoce</dc:creator>
      <dc:date>2025-11-28T18:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: External embedding for reports using federated credentials fails</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/external-embedding-for-reports-using-federated-credentials-fails/m-p/153661#M2552</link>
      <description>&lt;P&gt;I've also come across this issue and keen to see what the solution was.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;When you experience this issue, did you have a federation policy configured?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2026 23:15:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/external-embedding-for-reports-using-federated-credentials-fails/m-p/153661#M2552</guid>
      <dc:creator>Eugene_229</dc:creator>
      <dc:date>2026-04-07T23:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: External embedding for reports using federated credentials fails</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/external-embedding-for-reports-using-federated-credentials-fails/m-p/153746#M2554</link>
      <description>&lt;P&gt;At the time Databricks told us that external embedding of reports using federated credentials is not supported. They recommended using Service principal secrets and using that to generate the token needed for embedding.&lt;/P&gt;&lt;P&gt;We do have a federation policy configured and use it for all other Databricks API calls made by our Azure managed identity, without any issues.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2026 13:35:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/external-embedding-for-reports-using-federated-credentials-fails/m-p/153746#M2554</guid>
      <dc:creator>iamgoce</dc:creator>
      <dc:date>2026-04-08T13:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: External embedding for reports using federated credentials fails</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/external-embedding-for-reports-using-federated-credentials-fails/m-p/154285#M2556</link>
      <description>&lt;P&gt;Did you get any information whether this is on their roadmap?&lt;/P&gt;&lt;P&gt;I came across this issue last week and the documentation doesn't have anything about this limitation.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2026 08:23:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/external-embedding-for-reports-using-federated-credentials-fails/m-p/154285#M2556</guid>
      <dc:creator>gsbence</dc:creator>
      <dc:date>2026-04-13T08:23:41Z</dc:date>
    </item>
  </channel>
</rss>

