Forum Discussion
Dataflow Scheduled Refresh on Semantic Model Error, key did not match any rows in the table
- 1 year ago
Hi Brenz Yes, it might be able to solve the issue, as Gen2 supports mid-stream token refresh,unlike Gen 1 where OAuth2 tokens expire after an hour. So Gen2 will be preventing token expiration during refresh.
Hi Brenz Ok, this might be the reason for error. The OAuth2 token is likely expiring, causing authentication failures during scheduled refresh.
Could you try using service principal authentication or checking if your data source allows automatic token refresh?
Hello Akash, thank you for your response. We will explore on using service principal authentication. Additionally, our dataflow is set up in Gen1 currently, if we migrate to Gen2 would that solve the problem? This is based on the documentation I found regarding this.
"When using OAuth2 credentials in Dataflows Gen1, the gateway doesn't support refreshing tokens automatically when access tokens expire. Tokens typically expire 1 hour after the refresh starts, but can expire in less than 1 hour, depending on the data source and the tenant policies. Dataflows Gen2, Semantic models, Data pipelines are able to refresh tokens mid-stream and should not be impacted due to this."
https://learn.microsoft.com/en-us/data-integration/gateway/service-gateway-onprem-faq#why-do-i-get-the-errors--invalidconnectioncredentials--or--accessunauthorized--when-accessing-data-sources-using-oauth2-credentials-from-dataflows-gen1-even-though-the-credentials-are-updated-recently--mid-stream-token-refresh-issue--
- Akash_Varuna1 year ago
Super User
Hi Brenz Yes, it might be able to solve the issue, as Gen2 supports mid-stream token refresh,unlike Gen 1 where OAuth2 tokens expire after an hour. So Gen2 will be preventing token expiration during refresh.