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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
fareehasattar
Regular Visitor

OData cross company not working

Hi, 

 

In Power Bi for Data entities from D365 F&O I am using OData. But cross-company=true is not working. 

I am getting following error: 

Details: "Microsoft.Mashup.Engine1.Library.Resources.HttpResource: Request failed:
OData Version: 3 and 4, Error: The remote server returned an error: (400) Bad Request. (An error has occurred.)
OData Version: 4, Error: The remote server returned an error: (400) Bad Request. (An error has occurred.)"

 

How to resolve?

5 REPLIES 5
Shravan133
Super User
Super User

When working with Data Entities from Dynamics 365 Finance and Operations (D365 F&O) using OData in Power BI and encountering issues with the cross-company=true parameter, it's important to troubleshoot a few key areas to resolve the issue. Here are steps and considerations to help address the "400 Bad Request" error:

  1. Check OData URL Syntax

Ensure that your OData URL is correctly formatted. The cross-company=true parameter should be added to the query string. For example:

https://<your-dynamics-instance>/data/<EntityName>?cross-company=true

Verify that there are no typos or incorrect characters in the URL.

  1. Validate Entity Access and Permissions

Ensure that the entity you are trying to access is properly set up for cross-company queries. You may need to verify that the user account used for the OData connection has the necessary permissions to access data across companies.

  1. Verify Entity Configuration

In D365 F&O, check the configuration of the data entity. Ensure that:

  • The data entity is published.
  • The entity is marked as "Cross-company" in its configuration if required.
  1. Test URL Directly

Try accessing the OData URL directly from a web browser or a tool like Postman with the cross-company=true parameter to see if you receive a more detailed error message or if the request succeeds. This can help isolate whether the issue is with Power BI or with the OData service itself.

  1. Update Power Query M Code

Ensure that your Power Query M code correctly handles the request. For example:

let

    Source = OData.Feed("https://<your-dynamics-instance>/data/<EntityName>?cross-company=true", null, [Implementation="2.0"])

in

    Source

Make sure the URL is correctly substituted with your actual instance and entity name.

  1. Check OData Version

Confirm that you are using the correct OData version for your Dynamics 365 instance. D365 F&O typically uses OData V4, but there may be specific configurations or requirements for different versions.

  1. Review Dynamics 365 Documentation and Updates

Review the official Dynamics 365 documentation to see if there have been any changes or updates regarding the use of OData with the cross-company parameter.

  1. Check for Known Issues or Updates

Sometimes issues are due to known bugs or limitations in the platform. Check Microsoft's support forums or service status updates for any known issues related to OData in D365 F&O.

  1. Contact Support

If the problem persists after trying these steps, consider reaching out to Microsoft Support for more detailed troubleshooting. Provide them with the error message, URL, and any relevant details about your environment.

By following these steps, you should be able to diagnose and resolve the issue with the cross-company=true parameter in your OData requests from Dynamics 365 F&O to Power BI.

 

Hi @Shravan133 , 

 

Thank you for the detailed response. 

  1. Check OData URL Syntax: It is correct
  2. Validate Entity Access and Permissions: The account used for Odata connection is System Administrator in D365 F&O and in Power Bi it has Pro License. How to check if an entity is setup for cross-company queries. From the usual settings, I couldn't see any specific option to check this. It looks like other entities, which are working with cross-company =true parameter. 
  3. Entity Configuration: Yes the entitiy is published. Where to check the cross-company settings?
  4. Test URL Directly: The Url even in browser not working for cross - company, but working for the default entity. 
  5. Power Query M Code: I have already tried it. Didn't work. 
  6. Check OData Version: I have tried giving the version 4 explicitly to the query itself. But still the error remains the same. 
  7. Review Official Documentation:  Have checked. Now new changes, that I could find. 

 

Anonymous
Not applicable

Hi @fareehasattar ,

 

-- OData Version: 3 and 4, Error: The remote server returned an error: (400) Bad Request. (An error has occurred.) ...

This kind of error usually indicates that there is a problem with the syntax or parameters of the request that the client (on your side) is sending to the server, causing the server to be unable to understand or process the request.

I checked the D365 F&O documentation, which indicates support for the cross-company parameter:

By default, OData returns only data that belongs to the user's default company. To see data from outside the user's default company, specify the ?cross-company=true query option. This option will return data from all companies that the user has access to.

Example:

http://[baseURI\]/data/FleetCustomers?cross-company=true

To filter by a particular company that isn't your default company, use the following syntax:

http://[baseURI\]/data/FleetCustomers?$filter=dataAreaId eq 'usrt'&cross-company=true

Open Data Protocol (OData) - Finance & Operations - Cross-company behavior

Could you show us the format of your OData URL after erasing the privacy?

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Hi Gao, 

 

This is the format I am using

 

https://<your-d365fo-instance>/data/<dataentityname>?cross-company=true

 

The problem is that it is not even working in browser. Also, the same format is working for other data entity. But there is no apparent difference in the properties of data entities itself. 

Anonymous
Not applicable

Hi @fareehasattar ,

 

What if you change the protocol from https to http?

vcgaomsft_0-1723430716110.png

Open Data Protocol (OData) - Finance & Operations | Dynamics 365 | Microsoft Learn

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors