{
  "id": 19926176,
  "title": "Dynamics 365 Finance OData Returns Only One Company: How to Read Them All",
  "url": "https://urgent.news/2026/11/14/dynamics-365-finance-odata-returns-only-one-company-how-to-read-them",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-14T05:42:42.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/aimpexresources/dynamics-365-finance-odata-returns-only-one-company-how-to-read-them-all-5bp3"
  },
  "original_language": "en",
  "account": "A sales report created using Dynamics 365 finance and operations data may appear complete but could be missing data from multiple companies. This issue affects Supply Chain Analytics teams at Aimpex Resources Group LLC, as the report only shows figures for a single legal entity. The problem arises when a Power BI report pulls data from Dynamics 365, where the dataAreaId column only displays one company. Implementing cross-company=true in the URL does not resolve the issue when using Implementation=2.0.\n\nTo understand why OData shows only one company, Microsoft states that by default, OData returns data only for the user's default company. Cross-company=true is a query option that allows the retrieval of data from all companies the user has access to. However, this option does not override security settings. Each data entity in Dynamics 365 has a PrimaryCompanyContext property; when set, it assigns a dataAreaId field to each row, linking it to a specific company. In cases where this property is empty, the entity behaves like a shared table, containing data for all companies.\n\nWhen requesting data for one or all companies, it is essential to include the cross-company=true option in the entity URL rather than the /data/ root. Microsoft's examples demonstrate this by using URLs like https://[baseURI]/data/FleetCustomers?cross-company=true or https://[baseURI]/data/FleetCustomers?$filter=dataAreaId eq [companyId] &cross-company=true. Replace the entity name and company ID with your system's specific values.\n\nThe list of public entities can be found at [Your organization's root URL]/data, while field names can be found in /data/$metadata. To pull data from Python, a scheduled extract for a data warehouse typically runs as an app rather than a user. To achieve this, an app registration in Microsoft Entra ID and a record under System administration > Setup > Microsoft Entra applications is required. This app should map the client ID to a dedicated service account with appropriate permissions. Using MSAL (Microsoft's sign-in library for Python), the script can obtain a token, iterate through all pages, and count rows per company.",
  "summary": "A sales report built on Dynamics 365 finance and operations data can look complete and still be missing most of the business. For Supply Chain Analytics teams at Aimpex Resources Group LLC, this is a problem worth catching early, because the numbers add up but only for one legal entity. What does the problem look like? A common report: a Power BI report pulls Dynamics 365 data, but the dataAreaId…",
  "key_points": [
    "Dynamics 365 Finance OData returns data for default company only",
    "Cross-company=true query option retrieves data from all accessible companies",
    "PrimaryCompanyContext property assigns dataAreaId to each row for specific company"
  ],
  "editors_take": "Misconfiguring OData queries forces analysts to move beyond default security settings to ensure comprehensive data visibility across multiple legal entities within their supply chain reporting.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}