To address this, you can override the OAuth token lifetime policy for the Tableau integration with Databricks. Here's how:
Retrieve the Integration ID for Tableau - Use the Databricks CLI to list all published OAuth applications and find the integration ID associated with Tableau
databricks account published-app-integration list
This command will display a list of integrations. Note the integration_id
corresponding to Tableau.
Update the Token Lifetime Policy - Execute the following command to set new lifetimes for the access and refresh tokens:
databricks account published-app-integration update <integration-id> --json '{
"token_access_policy": {
"access_token_ttl_in_minutes": <new-access-token-ttl>,
"refresh_token_ttl_in_minutes": <new-refresh-token-ttl>
}
}'
- Replace
<integration-id>
with the integration ID obtained in the previous step. - Replace
<new-access-token-ttl>
with the desired access token lifetime in minutes (e.g.,1440
for 24 hours). - Replace
<new-refresh-token-ttl>
with the desired refresh token lifetime in minutes (e.g.,129600
for 90 days).
Additional Recommendations:
Verify Tableau's OAuth Configuration - Ensure that Tableau is configured to handle OAuth token refreshes appropriately. This may involve checking Tableau's documentation or support resources to confirm that it can utilize refresh tokens to obtain new access tokens automatically.
Monitor Token Expiry and Usage - Regularly monitor token usage and expiry to preemptively address potential authentication issues. This proactive approach can help maintain seamless data access without frequent manual interventions.
By adjusting the token lifetimes and ensuring proper configuration on both Databricks and Tableau sides, you can reduce the frequency of authentication prompts and maintain a more stable connection between the two platforms.
For detailed instructions, refer to the Microsoft documentation on overriding partner OAuth token lifetime policies: https://learn.microsoft.com/en-us/azure/databricks/integrations/manage-oauth
https://learn.microsoft.com/en-us/azure/databricks/integrations/configuration
I hope this information helps.
Kindly consider upvoting the comment if the information provided is helpful. This can assist other community members in resolving similar issues.