AdvancedMicrosoft Dynamics 365 Supply Chain Management / Finance and OperationsIntegration / APIs

Dynamics 365 Supply Chain Management API: OData, Custom Services and Data Packages

Question
dynamics 365 supply chain management api

Also searched as

  • web api dynamics 365
  • d365 finance and operations odata api
  • d365 custom service json api
  • d365 data entity api authentication

Short answer

Dynamics 365 Supply Chain Management exposes three main integration routes: OData endpoints over data entities for record-level reads and writes, JSON custom services for X++ logic you expose as operations, and the data management package API for bulk import and export. All use OAuth 2.0 with a Microsoft Entra ID app registration.

Applies to: Dynamics 365 Supply Chain Management and Finance (finance and operations apps), cloud-hosted. Endpoint details can change, so verify against Microsoft Learn.

Call the API for the first time

  1. 1Register an application in Microsoft Entra ID and create a client secret or certificate.
  2. 2In D365, register the application ID under System administration > Setup > Microsoft Entra ID applications and map it to a user with the needed security roles.
  3. 3Request a token with the client credentials flow, using your environment URL as the resource or scope.
  4. 4Call the OData endpoint at your environment URL under /data/, for example /data/Customers or the entity's public collection name.
  5. 5Pass the bearer token in the Authorization header, and use cross-company=true when needed since reads are scoped to the user's default company.
  6. 6For a custom operation, call POST /api/services/{ServiceGroup}/{Service}/{Operation} with a JSON body of the parameters.
  7. 7For bulk loads use the data management package API, or recurring integration for file-based queues.

Which route for which job

Use OData data entities for interactive and moderate volume record work: reading a sales order, creating a customer, updating a field. Entities enforce validation and defaults, so they are safe, but each call is relatively expensive and the service throttles heavy callers.

Use custom services when a business operation spans several tables or needs X++ logic, such as releasing and confirming an order. Use the data management framework package API for thousands of records, because it stages and processes in batches.

GET https://<environment>.operations.dynamics.com/data/Customers?$top=5&cross-company=true
POST https://<environment>.operations.dynamics.com/api/services/MyServiceGroup/MyService/myOperation
Authorization: Bearer <access token>

Authentication and security

The Entra application is mapped to a D365 user, and that user's security roles define what the API can do. Give integrations a dedicated user with least privilege and avoid reusing an administrator.

Business events and Dataverse virtual entities or dual write offer outbound and cross-app patterns when polling is the wrong shape. For event-driven designs, prefer business events to polling OData on a timer.

Reliability and throttling

Resource-based throttling returns HTTP 429 with a retry hint when an integration overloads the environment. Handle it with exponential backoff, smaller batches and off-hours scheduling. Our page on OData 429 covers it in detail.

Try it here, free

D365 Data Management Import Worksheet Template

Open full tool

Track every D365 DMF import by entity, sequence, legal entity, rows loaded and errors, with an automatic error rate for cutover reporting.

Common pitfalls

  • !Forgetting to register the Entra application inside D365, which returns authorization errors even with a valid token.
  • !Using OData for large migrations instead of the data management package API.
  • !Giving the integration user administrator rights.
  • !Ignoring 429 responses and retrying immediately.

How an ERP-grounded AI assistant handles this

Teams building integrations often spend time discovering entity names and fields. An assistant grounded in your metadata can point to the right entity and draft the request, and a read-only analytics layer can avoid hitting transactional endpoints for reporting. Netray's ERPray provides read-only access for questions, with human approval on any write-back.

Frequently asked questions

What is the D365 Supply Chain Management API?

It is a set of web interfaces: OData over data entities, JSON custom services and the data management framework package API. They let external systems read and write data under Entra ID authentication.

How do I authenticate to the D365 OData endpoint?

Register an app in Microsoft Entra ID, register its ID inside D365 with a mapped user, then request an OAuth 2.0 token and send it as a bearer token to the environment's /data/ endpoint.

Is there a REST API for D365 beyond OData?

Yes. Custom services exposed as JSON at /api/services, plus the data management package REST API for bulk import and export.

Why do I get 429 errors?

The platform throttles callers that consume too many resources. Reduce batch sizes, add backoff on the Retry-After value and spread jobs over time.

Related

How-to

Handling OData 429 Too Many Requests throttling in D365 Finance and Operations

D365 F&SCM protects shared AOS capacity by throttling OData and custom service calls, returning HTTP 429 with a Retry-After header once a client sends too many requests too quickly. The durable fix is to honor Retry-After with backoff and redesign high-volume or frequent-polling integrations to use batching, business events, or Data management instead of tight request loops.

How-to

D365 Recurring Integration: Enqueue, Dequeue and Ack Explained

Create a recurring data job on a data project, register an Entra ID application and authorize it in D365, then POST files to api/connector/enqueue/{activityId} to import, or GET api/connector/dequeue/{activityId} followed by an ack call to export. The job's activity ID in the URL ties your calls to the data project.

Error fix

Fixing "Cannot create a record in (table). The record already exists" in D365 F&SCM data entity imports

This is the standard kernel duplicate-key exception, thrown when the Data Management Framework tries to insert a staging row into a target table whose unique or alternate key already matches an existing record. It almost always means the entity's insert-vs-update logic did not recognize the target row as an update, not that you have a true accidental duplicate in your source file.

How-to

Dynamics 365 Supply Chain Warehouse Only Mode: What It Is and Its Limits

Warehouse management only mode is a Dynamics 365 Supply Chain Management configuration that lets you run the warehouse management processes while another system, such as a separate ERP, owns orders, pricing and finance. Source documents arrive as inbound and outbound shipment orders instead of sales and purchase orders, and the warehouse executes and reports back.

Error fix

Fixing "There are currently no batch servers available for processing" in D365 F&SCM

This message means the batch framework cannot find any AOS instance flagged as a batch server and available for the batch group the job is assigned to. The fix is almost always in server configuration (System administration > Servers) or batch group assignment, not in the batch job itself.

Error fix

Fixing "You do not have the following permissions on TableData (table): (permission)" in Business Central AL

This runtime error means the current user's assigned permission sets do not grant the required Insert, Modify, Delete, Read, or Execute right on that specific table. It is most common right after installing or updating a custom AL extension, because Business Central checks object-level permissions even for tables an extension owns.

AI for ERP

AI for Dynamics 365 Finance and Supply Chain beyond Copilot

AI for D365 Finance and Supply Chain beyond Microsoft Copilot: private LLM grounded on data entities and OData, on-prem-capable via Local Business Data.

Stuck on Microsoft Dynamics 365 Supply Chain Management / Finance and Operations?

Talk to engineers who work inside Microsoft Dynamics 365 Supply Chain Management / Finance and Operations every week, and who build private AI that answers these questions from your own ERP data.

Keep exploring

Free tools

ERP fixes and how-tos

AI on your ERP

Integrations

Comparisons

Software