[◂ Back to examples](https://zato.io/docs/dev/index.html)

D365

# Integrate Microsoft Dynamics 365 with your enterprise systems

Connect Dynamics 365 Finance and Operations, Business Central and Dataverse from Python. Read and write business entities over OData, with OAuth2 against Microsoft Entra ID, paging and serialization all handled by the platform.

[Downloads](https://zato.io/docs/admin/guide/install/index.html)

## Tutorials

[### OData tutorial Query SAP and Microsoft systems from Python - includes a complete Business Central walkthrough with OAuth2 configuration](https://zato.io/tutorials/odata.html) [### Microsoft 365 APIs in Python Build production-ready Microsoft 365 and Dynamics 365 automations without dealing with OAuth2 complexities](https://zato.io/tutorials/microsoft/365.html) [### In-depth API integration tutorial Learn how to design and build scalable, real-world, production-ready API integrations in Python](https://zato.io/tutorials/main/01.html)

## How to use the Dynamics 365 integration

[Create an outgoing OData connection and use self.odata in services](https://zato.io/docs/dev/odata/index.html) [Fill in the connection form for Finance and Operations or Business Central](https://zato.io/docs/dev/odata/systems/index.html) [Configure OAuth2 against Microsoft Entra ID](https://zato.io/docs/dev/odata/security/index.html)

## More examples

[### Dynamics 365 code examples Finance and Operations and Business Central over OData, plus Dataverse CRUD, in complete Python services](https://zato.io/docs/dev/examples/dynamics-365.html) [### System-specific notes Service root layout, composite keys with dataAreaId, companies in Business Central and ETag handling](https://zato.io/docs/dev/odata/systems/index.html) [### Query options Filter, select, expand, sort and page through Dynamics 365 entity sets from Python](https://zato.io/docs/dev/odata/query/index.html) [### Security OAuth2 client credentials with automatic token caching and refresh for Entra ID tenants](https://zato.io/docs/dev/odata/security/index.html) [### Testing Dynamics 365 connections Unit-test services with mocked OData responses and run live tests against an in-process test server that simulates Dynamics 365](https://zato.io/docs/api-testing/odata.html) [### Microsoft Dataverse in Python Full CRUD access to Dataverse tables behind Sales, Customer Service and other customer engagement apps](https://zato.io/blog/dataverse-in-python.html) [### Configuration as YAML Define Dynamics 365 connections declaratively with enmasse and deploy them across environments](https://zato.io/docs/admin/enmasse-reference.html) [### Data models Map Dynamics 365 entities to Python dataclasses for typed access and OpenAPI generation](https://zato.io/docs/dev/model/index.html) [### API configuration Where to keep environment-specific settings - tenant IDs, environment URLs and scopes](https://zato.io/docs/dev/examples/config.html)

## About Dynamics 365

Microsoft Dynamics 365 is a suite of enterprise applications covering ERP and CRM - Finance and Operations for large-scale ERP, Business Central for small and medium businesses, and customer engagement apps such as Sales and Customer Service built on Dataverse. All of them expose their data layer through OData, the protocol that Zato's outgoing OData connections use. With Zato, you configure a connection once - address, OData version, OAuth2 credentials - and every Python service can then read and write customers, invoices, journals or any other entity, orchestrating Dynamics 365 with databases, message queues and the rest of your systems.

## Frequently asked questions

### Which Dynamics 365 products can Zato connect to?

Finance and Operations, Business Central and Dataverse-based customer engagement apps such as Sales and Customer Service. See the [system-specific notes](https://zato.io/docs/dev/odata/systems/index.html) for the address and auth settings of each.

### How does authentication work?

Through OAuth2 client credentials against Microsoft Entra ID - you provide the token URL, tenant ID, client ID and scopes, and Zato caches and refreshes tokens automatically. Details are in the [OData security](https://zato.io/docs/dev/odata/security/index.html) chapter.

### How do I read data from Dynamics 365?

Obtain a client with [self.odata](https://zato.io/docs/dev/odata/index.html) and call .read, .get or .iter - entities arrive as plain Python dicts, with paging followed transparently.

### Can I write data too?

Yes - .create, .update and .delete cover the full CRUD range, including the [ETag-based optimistic concurrency](https://zato.io/docs/dev/odata/systems/index.html) that Business Central enforces.

### What about composite keys in Finance and Operations?

Pass a dict as the key, e.g. {'dataAreaId': 'usmf', 'CustomerAccount': 'US-001'} - the client formats it correctly, as shown in the [system-specific notes](https://zato.io/docs/dev/odata/systems/index.html).

### How do I integrate with Dataverse tables?

The [Dataverse in Python](https://zato.io/blog/dataverse-in-python.html) guide covers CRUD operations against Dataverse, including the mapping between UI names and API entity paths.

### How do I test Dynamics 365 integrations?

Mock OData responses in unit tests or run live tests against the in-process [OData test server](https://zato.io/docs/api-testing/odata.html) that simulates Dynamics 365 auth and validation behavior.

### Can I keep the configuration in version control?

Yes - define connections in YAML with [enmasse](https://zato.io/docs/admin/enmasse-reference.html) and import them per environment, with secrets read from environment variables.

## Ready to build Dynamics 365 integrations?

Get started with Zato and connect Dynamics 365 to your enterprise systems in minutes.

[Start the OData tutorial](https://zato.io/tutorials/odata.html)
