If you migrate from Dynamics 365 On-Premises to Dynamics 365 Online, SOAP-based integrations will require reworking due to differences in supported protocols. You’ll need to transition to the Web API, which is REST-based. Here’s a recommended approach for the migration:
1. Transition to the Web API
Rewrite the integration to use REST API: The Web API in Dynamics 365 Online is a modern, RESTful API that is the primary supported interface for external integrations. It supports OData v4 and provides full access to CRM data.
Recreate equivalent SOAP operations in REST: Identify each SOAP-based operation and convert it to equivalent Web API requests. This includes querying data, creating, updating, and deleting records, etc.
2. Update Authentication Method
Move from Windows Authentication to OAuth 2.0: Dynamics 365 Online uses Azure Active Directory for authentication via OAuth 2.0. Update your integration to authenticate using an Azure AD application registration.
Token-based authentication: Use access tokens provided by Azure AD for making API requests, which is the standard for secure connections with Dynamics 365 Online.
3. Refactor Business Logic and Custom Code
SOAP integrations often involve custom code that needs refactoring to match the structure and capabilities of the Web API.
Use client libraries if needed: Microsoft offers client libraries for Dynamics 365 Web API in different languages, which can simplify development. .NET developers, for example, can use the Microsoft.CrmSdk.XrmTooling.CoreAssembly package.
4. Consider Middleware if Necessary
If you have a complex integration, consider using middleware (such as Azure Logic Apps or Power Automate) to facilitate communication between the external system and Dynamics 365 Online. This approach can simplify handling authentication, logging, and error management.
5. Testing and Validation
Thoroughly test all reworked integrations in a sandbox environment to ensure data consistency, correct functionality, and proper handling of errors.
Summary
The best practice is to replace SOAP with the Dynamics 365 Web API, transitioning to OAuth 2.0 authentication, refactoring code, and considering middleware where helpful. This approach ensures that your integration aligns with Dynamics 365 Online’s supported standards and enhances security and scalability.