Forum Discussion

SakshiLakshkar's avatar
SakshiLakshkar
New Member
1 month ago
Solved

Power BI Service ODBC [GCP SOURCE] Token Refresh Issue For Scheduled Refresh

Hi Folks,   I am using ODBC gateway and GCP as source for Power BI dashboard. I need to refresh the token every 8 hours as per ODBC configurations/ clients policy. Now I have scheduled refresh and ...
  • v-aatheeque's avatar
    1 month ago

    Hi SakshiLakshkar 
    Thanks  for reaching out to Microsoft fabric Community Forum.Thank you for the detailed information.

     

    Based on your description, the scheduled refresh is failing because the authentication token used by the ODBC connection expires before the gateway can refresh the dataset. To help isolate the issue,
    please review the following:

    • Verify whether the ODBC driver supports automatic token renewal (for example, OAuth with refresh tokens or service account authentication). If only short-lived access tokens are supported, manual renewal may be required.
    • Confirm the authentication method configured for the ODBC DSN and the On-premises Data Gateway. Ensure the gateway is using the same authentication configuration as the one that works successfully in Power BI Desktop.
    • Check whether the token is being stored only in the local ODBC configuration. If so, verify whether it can be updated automatically through the driver or an external authentication mechanism.
    • Review the On-premises Data Gateway logs and the Power BI refresh history to identify the exact authentication error returned when the scheduled refresh fails.
    • Ensure the gateway is online, up to date, and that the ODBC driver version installed on the gateway machine matches the version used during development.
    • Test the ODBC connection directly on the gateway machine after the token expires to determine whether the issue is related to the ODBC driver or Power BI.
    • If your organization's security policy enforces short-lived tokens that cannot be extended, check with the ODBC driver vendor or the data source provider to determine whether they support unattended authentication methods, such as refresh tokens or service accounts.

    If the authentication mechanism relies solely on manually generated access tokens that expire every 8 hours and the driver does not support automatic token renewal, Power BI and the On-premises Data Gateway cannot renew the token automatically. In that case, an automated token refresh process outside of Power BI or an alternative authentication method supported by the data source would be required.

    Useful links : https://learn.microsoft.com/en-us/power-bi/paginated-reports/paginated-reports-odbc-support

     

    Hope this helps !!

    Thank You.

  • Prince0011's avatar
    1 month ago

    Hi,

    The scheduled refresh is likely failing because the Power BI Service and On-premises Data Gateway cannot automatically renew a short-lived ODBC access token. If the token expires every 8 hours, the gateway will continue using the expired credentials until they're updated.

    A few options to consider:

    • Use a service account (if your client permits) instead of a user token. This is the most reliable approach for scheduled refreshes.

    • If GCP supports OAuth refresh tokens for your ODBC driver, verify that the driver is configured to automatically obtain a new access token rather than requiring manual authentication.

    • Check whether your ODBC driver supports non-interactive authentication (service account, workload identity, or key-based authentication), which is better suited for unattended refreshes.

    • If the client's security policy requires short-lived tokens only, you'll likely need to automate token renewal outside of Power BI (for example, with a scheduled script that updates the gateway credentials or retrieves a fresh token before each refresh). Unfortunately, Power BI Service doesn't natively refresh arbitrary ODBC access tokens.

    A few questions that may help identify the best approach:

    • Which GCP service are you connecting to (BigQuery, Cloud SQL, PostgreSQL, etc.)?

    • Which ODBC driver are you using (Simba, Progress, Devart, CData, etc.)?

    • Are you authenticating with OAuth, a service account, or another authentication method?

    These Microsoft resources may also be helpful:

    If the ODBC driver itself doesn't support automatic token renewal, you may also want to contact the driver vendor, as some drivers provide built-in token refresh capabilities while others require external automation.

    If you found this reply helpful, please consider giving it a Kudos. If it helps resolve your issue, marking it as the Accepted Solution will help other community members facing the same challenge.