Forum Discussion

RMuoni's avatar
RMuoni
Regular Visitor
2 years ago
Solved

Data gateway datasource connection needs reauthentication everyday

Hello, I've run into a problem where the connection to our SQL server needs to be reauthenticated each day. It works fine through out the day even until evening but during the night it seems like something happens. The gateway shows as online but the connection to the data source shows as offline where I need to reauthenticate with my Oauth2 account to get it online again. the error message I receive is as below: 

Error code: InvalidCredentials
Connection error: Invalid credentials
Cluster URI: https://api.powerbi.com
Session ID: b32f8eb6-d90c-4eb6-bd3e-536ccba87993
Request ID: 3da1297c-3f3f-40e9-ae73-aae8d78dc43d
Time: Wed Apr 17 2024 12:10:40 GMT+0200 (Central European Summer Time)
:
gatewayclustername: Received error payload from gateway service with ID 1707849: <ccon>The credentials provided for the SQL source are invalid. (Source at servername.sql.azuresynapse.net;sqlPool.)</ccon>.

Is it that the token runs out after 24hrs which makes my credentials invalid? 

Thank you

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi RMuoni 

     

    Here are some steps to help you resolve or manage this issue:

    1. Token Expiry Confirmation: Check the expiration policy for your OAuth2 tokens. If the tokens are indeed set to expire every 24 hours, this would align with the issue you are experiencing.

    2. Automatic Token Refresh: Ideally, your authentication setup should support automatic refreshing of tokens. This can usually be configured in the application that manages your SQL server connections (like Power BI). Ensure that your application is set up to automatically refresh tokens. This might involve:
    Checking the configuration settings in Power BI or the gateway managing these connections.
    Implementing a script or using middleware that can automatically refresh the tokens when they are close to expiring.

     

     

     

     

    Best Regards,

    Jayleny

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi RMuoni 

     

    Here are some steps to help you resolve or manage this issue:

    1. Token Expiry Confirmation: Check the expiration policy for your OAuth2 tokens. If the tokens are indeed set to expire every 24 hours, this would align with the issue you are experiencing.

    2. Automatic Token Refresh: Ideally, your authentication setup should support automatic refreshing of tokens. This can usually be configured in the application that manages your SQL server connections (like Power BI). Ensure that your application is set up to automatically refresh tokens. This might involve:
    Checking the configuration settings in Power BI or the gateway managing these connections.
    Implementing a script or using middleware that can automatically refresh the tokens when they are close to expiring.

     

     

     

     

    Best Regards,

    Jayleny

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.