Export a BOM data entity package from Dynamics 365 Finance and Operations using the DMF package REST API (ExportToPackage → GetExecutionSummaryStatus → GetExportedPackageUrl)
Authenticate via OAuth 2.0 client credentials against the Azure AD tenant associated with the D365 F&O environment to obtain a bearer token.
Call POST /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.ExportToPackage with body {"definitionGroupId": "<DMF project name>", "packageName": "BOMExport", "executionId": "", "reExecute": false, "legalEntityId": "USMF"} — the response returns an executionId.
Poll GET /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetExecutionSummaryStatus(executionId='<id>') until the status field returns 'Succeeded'.
Call POST /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetExportedPackageUrl with body {"executionId": "<id>"} — the response returns a temporary Azure Blob Storage URL.
Download the ZIP package from the blob URL; unzip to access the CSV files for each data entity included in the DMF project (e.g., BOMHeaderEntity, BOMLineEntity).
Parse and load the CSV data into the target system; note that the blob URL expires (typically within 1 hour) so download promptly after retrieval.
Known gotchas
The DMF package API endpoints use OData function-import syntax with bound actions under the DataManagementDefinitionGroups entity set — they are not free-standing REST endpoints; the base URL must be the D365 F&O instance URL plus /data/.
GetExportedPackageUrl returns a pre-signed Azure Blob Storage URL with a short expiry; attempting to re-use the same URL after expiry returns a 403 from Azure Storage, not from D365 F&O, which can be confusing to diagnose.
DMF execution is asynchronous and may queue behind other batch jobs; poll intervals should use exponential backoff rather than tight loops to avoid throttling the D365 batch framework.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp