Forum Discussion
OData source error
- 3 months ago
all good
There is no gateway as all sources are cloud? Sharepoint or Microsoft Dynamics
Ok so I would start by clearing and reconfiguring the credentials at the dataset level.
Since I see multiple Web sources, this is likely causing Power BI to fail resolving the OAuth resource.
If possible, also check whether using a dedicated connector (like SharePoint) instead of Web would resolve the issue.
- mike_asplin4 months agoHelper V
Ok so went through every source and replaced web.contents with Sharepoint.Contents. I'm left with a CDS source, Sharepoint and 2 web sources. 1 is a public website and the other one seems to be the same as the CDS?
Still getting same Odata error but no idea where it is coming from. Have cleared the permissions, saved model under new name and still stuck
Data source error: {"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}}}
- mike_asplin4 months agoHelper V
Maybe thaty other web source is this which someone help me put together to limit the amount of data being pulled?
let BaseUrl = "https://chaxxxx.api.crm11.dynamics.com", Endpoint = "api/data/v9.1/bookableresourcebookings", SelectColumns = "bookableresourcebookingid,_bookingstatus_value,_resource_value,name,_cha_clientid_value,_owningteam_value,duration,starttime,_cha_carercontactid_value,_msdyn_workorder_value,msdyn_totalcost,endtime,statuscode,msdyn_milestraveled,msdyn_actualarrivaltime", FilterDateText = DateTime.ToText(#"Load Date", "yyyy-MM-ddTHH:mm:ssZ"), QueryRecord = [ #"$select" = SelectColumns, #"$filter" = "starttime ge " & FilterDateText ], Source = Json.Document(Web.Contents( BaseUrl, [ RelativePath = Endpoint, Query = QueryRecord ] )),Can that be changed to be a CDS type source. I really have no clue what the difference is between CDS and OData !!!!
- v-aatheeque4 months agoCommunity Support
Hi mike_asplin
This issue is often related to credential mismatches or stale OData connections. You can try the following steps to resolve it:
1.Clear permissions in Desktop
- In Power BI Desktop → File → Options and settings → Data source settings.
- Clear all stored permissions for CDS, SharePoint, and web sources.
- Re‑authenticate each source with the correct account.
2. Re‑enter credentials in Service
- Go to Power BI Service → Settings → Datasets → Data source credentials.
- For each source (CDS, SharePoint, Excel, public web), re‑sign in using OAuth.
- Ensure you’re using Organizational account for CDS/SharePoint, not “Anonymous” or “Windows.”
3. Check gateway configuration
- If any source is on‑premises (Excel on local SharePoint or file server), configure an On‑Premises Data Gateway.
- Cloud sources should not require a gateway, but mismatched settings can trigger OAuth errors.
4.Verify resource URLs
- Make sure the CDS and SharePoint URLs are consistent (e.g., using https://<tenant>.sharepoint.com/...).
- If you changed site collections or environments, update queries accordingly.
5. Republish the report
- After resetting credentials, republish from Desktop to Service.
- This often clears stale OData references that the Service still holds.
Hope this helps !!
Thank You.- mike_asplin4 months agoHelper V
So the models that dont work have this credential required and it wont accept OAuth2.
The CDS connection is fine with OAuth2
I spent ages stripping out this query and replacing it with a standard CDS query that is filtered inside the query editor
let BaseUrl = "https://chaxxxx.api.crm11.dynamics.com", Endpoint = "api/data/v9.1/bookableresourcebookings", SelectColumns = "bookableresourcebookingid,_bookingstatus_value,_resource_value,name,_cha_clientid_value,_owningteam_value,duration,starttime,_cha_carercontactid_value,_msdyn_workorder_value,msdyn_totalcost,endtime,statuscode,msdyn_milestraveled,msdyn_actualarrivaltime", FilterDateText = DateTime.ToText(#"Load Date", "yyyy-MM-ddTHH:mm:ssZ"), QueryRecord = [ #"$select" = SelectColumns, #"$filter" = "starttime ge " & FilterDateText ], Source = Json.Document(Web.Contents( BaseUrl, [ RelativePath = Endpoint, Query = QueryRecord ] )),and so far the refresh hasnt crashed and I dont see that extra web connection in the data source credentials list. So seems to be this causing the issues. Is it possible to write similar query that filters the data BEFORE it arrives that uses a CDS connection?