Forum Discussion
Schedule Refersh fails
- 1 year ago
Hi Pal_S
You're encountering a common but nuanced issue related to token persistence and workspace access permissions for guest users in Power BI, particularly when using OAuth2 authentication with dataflows in a cross-tenant setup. As a guest user from Company A working in Company B's tenant, the credentials you provide during an on-demand refresh are tied to an interactive session—meaning Power BI temporarily caches your OAuth2 token to complete the refresh. However, in a scheduled refresh, Power BI relies on stored credentials or service-level authentication that must be persistently valid without user interaction. Unfortunately, for guest users, OAuth2 tokens often expire or fail to persist properly for background service refreshes, especially in Gen1 dataflows where credential caching isn't as robust and multi-tenant authentication can break silently.
The error you're seeing — The key didn't match any rows in the table — is misleading but commonly surfaces when Power BI cannot authenticate properly or access the workspace/dataflow metadata, often due to invalid or expired credentials rather than a real schema issue.
To resolve this, you can try the following:
Ensure you re-enter credentials in the dataflow settings under "Edit Credentials" in the Power BI Service (not just Power BI Desktop) and choose Organizational Account + OAuth2 as the authentication method.
Consider switching from a Gen1 to a Gen2 dataflow, which offers better support for enterprise data gateway integration and more resilient credential management.
If possible, request that a native user in Company B’s tenant (not a guest) owns the dataflow and sets up the scheduled refresh. As a guest, you may lack certain hidden permissions that the Power BI service expects during unattended execution.
If the data source is behind a private endpoint, ensure that the gateway is correctly configured and accessible to the Power BI Service under your guest context—sometimes guest users are not permitted to execute through gateways for scheduled operations due to tenant security policies.
Lastly, reach out to Company B's Power BI admin to verify that cross-tenant access and OAuth token persistence for guests are allowed in Azure Active Directory settings. Some tenants restrict token caching or have conditional access policies that block background OAuth flows for guest accounts.
Ultimately, the most stable solution—if allowed—is to have a native user in Company B’s tenant manage the dataflow or use a service principal with proper gateway and data source credentials configured, which avoids these token volatility issues entirely.
Hi Pal_S ,
Just wanted to check if you had the opportunity to review the solutions provided?
If the response has addressed your query, please accept it as a solution so other members can easily find it.
Thank You
Hi,
I’m already using the “Organizational” data source, so that piece looks correct, i guess?
Exporting the data to my own tenant would still require a daily re-publish, which doesn’t solve the scheduled-refresh issue.
I remain a guest in Company B’s tenant. I suspected this was the blocker, but Company B created a new guest test account and its scheduled refresh ran successfully, so they’re not keen to promote my account to a member.
Are there any other settings or permissions that could explain why the refresh fails only for my account?
Also, any suggestion, how token expiration issue can be resolved?
Thanks!