Forum Discussion
OData cross company not working
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.