Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

0

Power BI Desktop Odata.Feed connection issue after refreshing the data source

We experience connection issues at all of our existing Desktop reports that are using OData.Feed connections.

After refresh, we got this error message:
DataSource.Error: OData: The feed's metadata document appears to be invalid. Error: A supported MIME type could not be found that matches the content type of the response. None of the supported type(s) 'application/xml' matches the content type 'text/html'.


Sample query:

let
queryString = "DATASOURCE",
Source = OData.Feed(queryString, null, [Headers=[ #"X-API-Key" = "APIKEY" ] ] )
in
Source

 

We tried to trace packets, and found this, which is a possible reason of the problem.
"Using Fiddler - I can see that sometimes PowerBI will call the HTTP endpoint for the metadata under the covers. This gets a 308 response as nginx correctly redirects to the HTTPS endpoint, however it seems PowerBI doesn't handle this which is why we get that error message, as the return type of the 308 is 'text/html'. So the challenge now is to understand why PowerBI is sometimes reverting to HTTP for the metadata. "

Please advise how we can solve this.
None of our existing desktop reports is working.

Status: Delivered
Comments
Anonymous
Not applicable

Hi @zaltperg ,

 

This can help avoid the redirection issue and make sure your OData.Feed query explicitly uses HTTPS instead of HTTP. 

let
    queryString = "https://DATASOURCE",
    Source = OData.Feed(queryString, null, [Headers=[ #"X-API-Key" = "APIKEY" ]])
in
    Source

 

If it doesn't help, please be free to let me know.

 

Best Regards,
Community Support Team _ Caitlyn

papercut
Regular Visitor

Hi @Anonymous ,

 

Thank you for your answer.
This was the last attempt for getting data from the source:

let
    queryString = "https://DATASOURCE",
    Source = OData.Feed(queryString, null, [Implementation = "2.0",  ODataVersion = 4, OmitValues = ODataOmitValues.Nulls, Headers=[ #"X-API-Key" = "APIKEY", #"Content-Type"="odata.metadata=nometadata" ] ] )
in
    Source

It gives the same error message.
Best regards,
@zaltperg 

 

papercut
Regular Visitor

Hi @Anonymous ,
We found the issue, and it is related to an in-house develeopment.
Our engineering team are working on resolving this.
Than you again for looking into this.
Best regards

Anonymous
Not applicable

Hi all,

 

Thanks for your feedback and share.

 

Best Regards,
Community Support Team _ Caitlyn