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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
speschka
Regular Visitor

Custom Data Connection Returns JSON But Desktop App Says OData Not Service or Feed

I've been working on a custom data connector for Power BI desktop that consumes data from a REST API we've built that is secured by Azure AD.  I thought I was finally through the hard part - getting the authentication working - but now that I'm connecting to our REST API and retrieving data, I'm getting the error from Power BI Desktop of "OData:  The given URL neither points to an OData service or a feed."  

 

When I look in Fiddler though, I can see data coming back, and it's all correctly formatted JSON.  I copied the data from Fiddler and pasted directly into a Visual Studio JSON document and it shows no errors at all.  So...I'm not really sure what Power BI wants here.  My feed is configured in my custom data connector like this:

 

source = OData.Feed("https://www.foo.com/api/data/powerbisummarydata")

 

The only thing I could think of was that perhaps "OData.Feed" isn't the right option, but I could not find another one in the SDK that would appear to work.  Any suggestions?  I've been looking through the MyGraph sample as well in the SDK samples and cannot find anything it's really doing differently.

 

Thanks.

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @speschka,

 

If you want to use Odata feed connector, you should confirm the data source is odata type.
For you scenario, I think you can try to use web.content with json connector.

 

Sample:

source=Json.Document(Web.Contents("https://www.foo.com/api/data/powerbisummarydata"))

 

Reference link:

M Query to use POST method on a Web API

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @speschka,

 

If you want to use Odata feed connector, you should confirm the data source is odata type.
For you scenario, I think you can try to use web.content with json connector.

 

Sample:

source=Json.Document(Web.Contents("https://www.foo.com/api/data/powerbisummarydata"))

 

Reference link:

M Query to use POST method on a Web API

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.