Hi! I'm here to help!
Chatbot Icon
Latest Highlights
🏆 ITKnocks places 6th in the CRN Fast50
🎖️ We are now Microsoft Solutions Partner - Business Applications
🏆 ITKnocks places 6th in the CRN Fast50

Integrate External Application with D365 CRM

By Muhammad Asif

Introduction

Integrating external applications with Microsoft Dynamics 365 CRM can be easily managed using Power Automate. In this article, we will guide you step-by-step through the process, starting with setting up an HTTP trigger in Power Automate to receive requests from an external application, then authenticating using a JWT token, and finally performing operations in D365 CRM.

This method is part of a broader approach known as Power Automate D365 Integration, which allows secure and automated interaction between external systems and Dynamics 365 CRM.

Prerequisites

Before proceeding, ensure you have the following.

  • Access to Microsoft Entra ID (formerly Azure AD)
  • Power Automate license
  • D365 CRM instance
  • Postman for testing API requests

Step 1. Register an Application in Microsoft Entra ID.

To enable external applications to authenticate and interact with Power Automate, follow these steps:

  • First, go to Microsoft Entra ID in the Azure portal.

  • Next, navigate to App registrations and click New Registration.

  • Then, enter a name for your application and select the supported account type.

  • Once registered, note down the Client ID.

  • After that, go to Certificates & secrets, generate a new Client Secret, and copy its value.

  • Finally, navigate to Enterprise applications, find your registered app, and note down the Object ID.

Integrate External Application with D365 CRM
Integrate External Application with D365 CRM
Integrate External Application with D365 CRM
Integrate External Application with D365 CRM
  • Copy the Client ID.
Integrate External Application with D365 CRM
  • Create Client Secrete from here.
Integrate External Application with D365 CRM
Integrate External Application with D365 CRM
  • Add the Secret.
  • Copy the Secret else it will not be visible after a few minutes.
Integrate External Application with D365 CRM
  • Go back to Entra ID and copy the Tenant ID as well.
Integrate External Application with D365 CRM
  • Now, we have to get the Object ID from the Enterprise Application.
Integrate External Application with D365 CRM
Integrate External Application with D365 CRM

Step 2. Create a Power Automate Flow with an HTTP Trigger.

  • Go to Power Automate.
  • Click Create and select Instant Cloud Flow.
  • Choose When an HTTP request is received as the trigger.
  • Define the request schema based on the expected payload.
  • Under Settings, go to Allowed Users and paste the Object ID obtained from Entra ID.
  • Save the flow to generate a unique HTTP POST URL.

Go to https://make.powerautomate.com

This flow forms a key part of the Power Automate D365 Integration strategy, enabling real-time communication between external applications and CRM.

Integrate External Application with D365 CRM

Add a trigger When an HTTP request is received.

Integrate External Application with D365 CRM

Select Specific users in my tenant.

Integrate External Application with D365 CRM

Paste the Object ID.

Integrate External Application with D365 CRM

Give a sample JSON that you want to get as a request from the External Application.

Integrate External Application with D365 CRM
				
					{
    "firstname": "Muhammad",
    "lastname": "Asif"
} 
				
			

Add New Step Add a new row.

Save the flow and then copy the updated URL from the Step.

Integrate External Application with D365 CRM
Integrate External Application with D365 CRM

Step 3. Generate JWT Token Using Postman.

To authenticate requests, generate a JWT token using Postman.

  1. Open Postman and create a new POST request.
  2. Set the request URL to: https://login.microsoftonline.com/{TenantID}/oauth2/v2.0/token
  3. In the Body, select form-data and add the following fields.
    • grant_type: client_credentials
    • client_id: Your registered application’s Client ID
    • client_secret: The generated Client Secret
    • scope: https://service.flow.microsoft.com//.default
  4. Click Send and copy the access_token from the response.

Step 4. Test the Power Automate Flow.

  1. In Postman, create a new POST request to the Power Automate URL generated earlier.
  2. Add the following headers.
    • Authorization: Bearer {access_token}
  3. Define the Body payload matching the request schema in Power Automate.
  4. Click Send and verify if Power Automate receives the request.

Add JSON into the request body.

Integrate External Application with D365 CRM

Add Authorization Header and Add Bearer Token.

Integrate External Application with D365 CRM

Execute the API call from POST Man.

Step 5. Perform Operations in D365 CRM.

Once Power Automate receives the request, it can process it to interact with D365 CRM using the Dataverse connector.

Create a record: Use the “Add a new row” action to insert data.

Now go to the Power Automate Run History.

Integrate External Application with D365 CRM

The request is received successfully.

The record is created into CRM Dataverse successfully.

Conclusion

Integrating an external application with Microsoft Dynamics 365 CRM (D365 CRM) using Power Automate and Microsoft Entra ID provides a secure and efficient way to automate CRM interactions. By combining these tools, you can leverage HTTP triggers and JWT authentication to seamlessly perform CRUD operations within D365 CRM. As a result, this approach enhances automation, improves data consistency, and streamlines business workflows—ultimately making it a powerful solution for integrating third-party applications with Dynamics 365 CRM.

The Power Automate D365 Integration approach simplifies complex workflows, improves data consistency, and allows your external apps to operate in sync with your CRM environment.

Let's Shape the
Future Together!

At ITKnocks, we are more than an IT consulting company; we’re your strategic partner in business evolution. With a global footprint and a passion for technology, we craft innovative solutions, ensuring your success. Join us on a journey of excellence, where collaboration meets cutting-edge IT expertise.