Forum Discussion
cannot refresh report automatically
Hi Biesse
The error you’re encountering — DMTS_OAuthFailedToGetResourceIdError — typically indicates that Power BI is attempting to use OAuth authentication for a data source (in this case, SQL Server) that does not support it in your configuration. This often happens when the dataset’s credentials in the Power BI Service are incorrectly set or mismatched with the connection type defined in Power BI Desktop. To fix this, go to your Power BI Service → Settings → Datasets → Data source credentials, locate your dataset, and verify the authentication method. If your SQL Server is on-premises, ensure that it connects through an On-premises Data Gateway using Windows Authentication or Basic Authentication, not OAuth. Then, re-enter valid credentials with access to the SQL database and apply the changes. If your SQL Server is hosted in Azure (e.g., Azure SQL Database), then OAuth (via Azure AD authentication) can be used, but you’ll need to reauthorize the connection under your Power BI account. Also, ensure the gateway is online and properly mapped to the data source under Manage Gateways. Once credentials and gateway mapping are corrected, trigger a manual refresh — it should succeed, and subsequent scheduled refreshes will run without error.