Forum Discussion
cannot refresh report automatically
Hi,
I created a report linked to sql server.
I cannot refresh it automatically because of incorrect credentials.
This is the error I had:
Failure details: The last refresh attempt failed because of an internal service error. This is usually a transient issue. If you try again later and still see this message, contact support.
{"error":{"code":"DMTS_OAuthFailedToGetResourceIdError","pbi.error":{"code":"DMTS_OAuthFailedToGetResourceIdError","details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"Failed to get OAuth resource, please make sure the OAuth is supported"}}],"exceptionCulprit":1}}}
Next refresh for Cruscotto BI - Copia is scheduled for October 11, 2025 15:00 UTC.
What can I do?
Thanks
Bianca
11 Replies
- GilbertQSuper User
Hi Biesse
One other thing I would add is if you're using a gateway, log in to the gateway and see if you can connect to the SQL server from the gateway machine because sometimes there might be connectivity issues between the gateway and your SQL server as well. As mentioned above, try the Windows authentication or basic authentication when you are connecting from your gateway server.
- ibarrauSuper User
Hi. Is this a SQL Server in azure or is it onpremise or inside a VM. If this is a cloud instance go to Data Source settings for the Semantic Model and edit the credentials for the source. If this is local instance you should use a Power Bi Gateway. You can read more info in here: https://learn.microsoft.com/en-us/power-bi/connect-data/service-gateway-sql-tutorial
I hope that helps,
- BiesseNew Member
Hi all,
I'm waiting for some tests from our IT, I gave all the information you shared.
I hope this can help, but I still don't have an answer for you. I'll let you know.
Br
Bianca
- v-veshwara-msftCommunity Support
Hi Biesse ,
Just wanted to check if there’s any update from your IT team regarding the gateway tests. Please let us know if you have an estimated timeline for completing the checks so we can follow up accordingly.
Thank you.
- MasonMASuper User
Hi,
You may need to avoid using OAuth for SQL Server. Try using Windows Authentication or Basic Authentication via a gateway instead. Also make sure the on-premises data gateway is installed and running and confirm that the gateway is mapped to the correct data source and credentials.
In Power BI Service, Re-enter the SQL Server credentials in Data source credentials under Dataset Setting.
Here is a post with similar error.
Solved: DMTS_OAuthFailedToGetResourceIdError - Microsoft Fabric Community
- v-veshwara-msftCommunity Support
Hi Biesse ,
Just checking in to see if the issue is resolved.The suggestions shared regarding verifying gateway connectivity and switching from OAuth to Windows or Basic authentication are aligned with the recommended approach for SQL Server connections.
Thanks to the community members for their guidance on this. If you are still facing issues after updating the credentials, please confirm whether your SQL Server is hosted on Azure, on-premises, or a VM so we can assist further.
Thank you.
- BiesseNew Member
Hi,
thanks for all replies.
We are still verifying with our it manager to fix some problems with gateway. Our SQL servers are hosted on premises, but I'm not able to reach them out, for the moment!
I will update you as soon as I can.
Bianca
- R1k91Super User
so you basically need:
- one working standard gateway (not personal)
- that gateway must be in the same network of your SQL Servers or must be able to reach that network through correct firewall rules
- you need an account to connect, you should verify which type of autheticantion are supported by your instance (SQL Auth or Windows Auth most common)
- you need to setup the connection in the service with this credentials leveraging that gateway
- you need to map the connection in the dataset to the one configured in the gateway
- V-yubandi-msftCommunity Support
Hi Biesse ,
May I know if your issue has been resolved, or if you still need any additional details? Please let us know if you need any further assistance.
Thank you.
- Poojara_D12Super User
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.