Dynamics 365 CRM offers multiple types of APIs for developers to interact with the system. The main types of APIs available for Dynamics 365 CRM are:
The primary and most modern API for Dynamics 365 CRM is the REST-based Web API. This API provides a RESTful interface for interacting with Dynamics 365 data and metadata. Key points about the Web API include:
While less modern, the SOAP-based Organization Service is still available and supported. Some key points about the Organization Service:
Dynamics 365 also provides Software Development Kit (SDK) APIs for various programming languages, which often wrap the Web API or Organization Service. These include:
The Dynamics 365 CRM API supports webhooks, introduced in Dynamics 365 for Customer Engagement apps version 9.0.
You can subscribe to various server events using webhooks, including:
Webhooks enable integration of Dynamics 365 data with custom code hosted on external services.
They use a lightweight HTTP pattern with a publish/subscribe model.
Authentication options include:
Webhooks can be used for both synchronous and asynchronous steps.
They send POST requests with JSON payloads consumable by any programming language or web application.
Scalability considerations:
To implement webhooks:
Test webhook registrations using request logging sites like RequestBin before implementing your own service.
Register and test webhooks using the plugin registration tool.
Here are the key points about the API Rate Limits for the Dynamics 365 CRM API:
Microsoft applies limits to API usage to ensure consistent availability and performance for all users.
The limits are designed to detect when client applications are making extraordinary demands on server resources.
Normal users of interactive clients should not be affected. Only client applications performing extraordinary API requests will be impacted.
Two of the service protection API limits are evaluated within a 5 minute (300 second) sliding window.
Limits are enforced per user. Each authenticated user is limited independently.
Limits are based on three factors:
For Dynamics 365 CRM (Dataverse), the default limits are:
Limits are enforced per user, per application ID, per web server.
When limits are exceeded, a 429 Too Many Requests error is returned.
Certain services like Document Routing Agent, Retail Server API, etc. are currently exempt from these limits.
Resource-based limits are also enforced based on overall environment resource utilization.
Limits may vary between environments and are subject to change.
Consider strategies like decreasing records selected in lists or using batch operations to avoid hitting limits.
Monitor API usage to track throttling.
Be prepared to handle 429 errors and implement retry logic with backoff.
In summary, while normal interactive usage should not be affected, applications making high-volume API calls need to be designed with these limits in mind to ensure smooth operation within the Dynamics 365 CRM environment.
The most recent version of the Dynamics 365 CRM API is version 9.2, which was released in October 2021 as part of the 2021 release wave 2. This version introduced several new features and improvements to the Dynamics 365 Customer Engagement platform.
Key points to consider:
• The Dynamics 365 CRM API is part of the broader Dynamics 365 Customer Engagement platform.
• Microsoft regularly updates the API to introduce new features, improve performance, and enhance security.
• Version 9.2 includes updates to the Web API, which is the RESTful API for interacting with Dynamics 365 data.
• Developers should always refer to the official Microsoft documentation for the most up-to-date information on API versions and features.
Best practices:
Stay informed about new releases and updates to ensure you're using the latest features and security improvements.
When developing applications that integrate with Dynamics 365 CRM, always use the most recent stable version of the API to take advantage of new capabilities and optimizations.
Be aware of any deprecated features or changes in newer versions that might affect your existing integrations.
Regularly review your API usage and update your applications to align with the latest best practices and performance recommendations provided by Microsoft.
It's important to note that while version 9.2 is the most recent major release, Microsoft may have released minor updates or patches since then. Always check the official Microsoft documentation for the most current information on API versions and features.
To get a developer account for Dynamics 365 CRM and create an API integration, you'll need to follow these steps:
Sign up for a Microsoft 365 Developer Program:
Set up a Developer sandbox environment:
Enable the Dynamics 365 CRM app:
Create an Azure Active Directory (AAD) application:
Configure API permissions:
Obtain API credentials:
Set up your development environment:
Here are the key data models you can interact with using the Dynamics 365 CRM API, along with what is possible for each:
Possible operations:
Possible operations:
Possible operations:
Possible operations:
Possible operations:
Possible operations:
Possible operations:
The API provides comprehensive access to interact with and manipulate the core data models and structures within Dynamics 365 CRM. This allows for extensive customization and integration capabilities.