cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BrentMcA
Regular Visitor

Dynamics 365 OData error with Power BI desktop

Hi, I am trying to connect Power BI desktop to Dynamics 365 Online. 

 

After putting in the correct credentials, it starts to load the metadata then fails with this message:

"OData: The feed's metadata document appears to be invalid"

 

I am using the OData endpoint URL that I copied from the Instance Web API section in D365 Settings eg:  https://crmxxxxx.api.crm.dynamics.com/api/data/v9.0/.

This is a clean install of Dynamics 365 so there is no customisation of the schema.

 

I can return the metadata in a browser and nothing obvious stands out.

 

I have successfully connected to a version 8 instance of Dynamics 365 so I know that I have the right steps.

 

Is there a known issue with Power BI desktop (latest version) and the July 2017 release of Dynamics 365?

 

 

Regards

Brent McA

 

 

1 ACCEPTED SOLUTION

Excellent, that got it working.  Thanks.

View solution in original post

49 REPLIES 49
Hermilo1984
New Member

Hello,

I'm using the Free version for Desktop (in italina Language).

The one from JUNE 2018 (the updated one just downloaded)

My Dynamics 365 Online is this: https://*****.api.crm4.dynamics.com/api/data/v8.2/ but it is not connecting (I'm logging as Dynamics 365 Admin - Not Office 365 Admin). Into the PowerBI Desktop Free Application, appears this error (in Italian because the PowerBI downloaded is in italian): Dettagli: "OData: Il documento di metadati del feed non è valido."

Can you help me?

Thank you.

stijnbakker
Frequent Visitor

Same issue here Smiley Sad

 

Existing reports are still working but when i want to create a new report in Power BI Desktop with de Dynamics 365 API i get the same error message. 

 

i'm using V8.2 and tried it on different organizations. 

Stijnbakker were your existing reports using the org data svc linked above or the api? I made a dreaded MS support ticket so we'll see how that goes.. lovely ;\

My existing reports are using the api V8.2 at this moment. We will see how quickly the solve it 😉

I checked this morning and mine are randomly working again using 8.2 API. Same server version/etc..

 I had the same problem.

 

However, since today I can connect again with all of these:

8.1

8.2

9.0

Old api (organization one)

 

Just to let you know

This should work for all those having trouble connecting PBI to their D365 instance.

Select "Get Data", then "Blank Query", Then input the following

 

= OData.Feed("paste your instance web api here") 

 

This should pull up everything from your instance.


@PBI_Curve wrote:

This should work for all those having trouble connecting PBI to their D365 instance.

Select "Get Data", then "Blank Query", Then input the following

 

= OData.Feed("paste your instance web api here") 

 

This should pull up everything from your instance.


This is exactly what we are all doing but the problem is in Dynamics 365/CRM 9.x the API is having issues with powerbi. It's fixed now but based on the thread wasn't the first time it's had issues sadly. Hopefully its fixed for good.

Ok, so I am sorry I don't understand.

 

I entered the information in a blank query as identified and it returned the information as rows in the query results but what do I do from there?  I am sorry, I was thinking I would have the ability to show a list of tables and then join them together, etc.  I don't see this.

 

Sorry if stupid question. 

@dpoggemann - You might need to add the entity name at the end of the URL to pull records into tables. In Dynamics CRM, the entity names should be pluralized.

 

For example (Advanced Editor code):

let
    Source = OData.Feed("https://my_org_name.api.crm.dynamics.com/api/data/v8.2/new_myrecords"),
in

    Source

 

You can create queries for each record type that you need. I would recommend creating "Shaped Tables" if you need to join multiple record types. That is to say, keep the queries basic, and then create new tables based on the queries that can merge, sort, filter, group, etc.

 

I hope this helps.

Thanks for the tip! It worked for me, form the blank query i can select the different tables in Dynamics 365. I hope the refresh still works when I publish my report to Azure. 

 

We will see...

 

Thanks!

Anonymous
Not applicable

Even though you are connecting to a 9.0 instance, change your url to 8.2 and it will connect

https://yourorg.api.crm.dynamics.com/api/data/v8.2/

Excellent, that got it working.  Thanks.

View solution in original post

This doesn't seem to work for me

Not working for me either. 

 

I tried changing the API version in the URL I supply to PowerBI doesn't make any difference. Still get the same excuse

 

"OData: The feed's metadata document appears to be invalid."

 

 

Yet the exact same URLs that fail in PowerBI work just fine in the browser. I am able to retrieve the OData JSON.

 

Thoughts?

 

 

I engaged MS Support, and they said v9.0 is not currently supported.

Tried 8.2. Issue remains. I'm doing a fresh install of PowerBI on a different machine to see if the problem is machine related

Same issue different machine accessing same URL. Still receiving the same error regardless of version in the URL.

 

BTW... all of the following URLs work poerfectly in IE, Edge, Firefox, Opera... but not in PowerBI

 

https://<my tenant>.crm.dynamics.com/api/data/v8.2/ <-- returns OData JSON of all Entities

https://<my tenant>.crm.dynamics.com/api/data/v9.0/ <-- returns OData JSON of all Entities

https://<my tenant>.crm.dynamics.com/api/data/v8.2/accounts <-- returns all Account data

https://<my tenant>.crm.dynamics.com/api/data/v9.0/accounts <-- returns all Account data

https://<my tenant>.api.crm.dynamics.com/api/data/v8.2/accounts <-- returns all Account data

https://<my tenant>.api.crm.dynamics.com/api/data/v9.0/accounts <-- returns all Account data

 

Is there a dependency I am missing. Am I missing something in my URL? 

 

Is there a way for me to see the actual response message? 

I am also experiancing this issue even though I am pointing at the v8.2 api in my URL.  I have tried it with several organization tenants for different customers and they all fail to load any oData information from Dynamics.   I had other coluges try to connect to our service with the same results:

 

odata.png

I need to open a ticket, but not sure if it is a Dynamics 365 issue, or PowerBI.

Smoov01

If you paste the OData URL into a browser are you getting a valid JSON document back? If you do, then I think the problem is PowerBI, not Dynamics. 

 

Append one of your entity types to the URL,  https://<your tenant>.crm.dynamics.com/api/data/accounts  (For example) this will return all of you account data. IF you get that in a browser, the issue is PowerBI

 

John 

Yeah those all work fine with a web browser.  I have a ticket open with Microsoft, and they are trying to figure out what is causing it.  Will post back when I know more.

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Kudoed Authors