Connecting Power BI Desktop to Dynamics 365 Online: API Version

When trying to connect Power BI Desktop to Dynamics 365, I went in Dynamics 365, customizations, developer resources, and copied the Instance Web API – Service Root URL: ,

https://leolix.api.crm4.dynamics.com/api/data/v9.0/

After pasting that in Power BI Desktop, I encountered the following error:

“OData: The feed’s metadata document appears to be invalid”

The way I found to fix this error was to adapt the Web API url to the following:

https://leolix.api.crm4.dynamics.com/api/data/v8.2/

thus replacing 9.0 to 8.2 in order to target the previous version. It would seem the latest version is not yet supported by Power BI…

And it’s the case, as explained here.

“Currently, the Power BI service isn’t compatible with the Dynamics 365 (online) version 9.0 OData endpoint. When you try to use the version 9.0 OData endpoint with the Power BI service the error message “The feed’s metadata document appears to be invalid” is displayed. To work around this incompatibility, use the Dynamics 365 (online) version 8.2 OData endpoint.For more information about the different endpoint versions, see Web API URL and versions.”