Dataverse-Azure Plugin, Service Bus Queue & Custom API
Image Source: Shutterstock.com
Microsoft Dataverse
Sep 29, 2023 7:05 AM

Dataverse-Azure Plugin, Service Bus Queue & Custom API

by HubSite 365 about Temmy Wahyu Raharjo

Citizen DeveloperMicrosoft DataverseM365 Hot News

Learn to integrate Azure Service Bus Queues with Dataverse to efficiently process your data in the correct order.

The original blog post covers a detailed guide for implementing Azure Service Bus Queue with Microsoft's data service, touching on the benefits and providing a step-by-step illustration of the process. The post is authored by Temmy Wahyu Raharjo, a Microsoft Dynamics 365 Technical Consultant and co-leader of KL Power Platform User Community.

The author begins by advocating for the usefulness of the Azure Service Bus Queue with Microsoft's data service. It's noted how the Queue brings forth the ability to order requests efficiently, thus ensuring data processing is performed in the right sequence. To help readers, he outlines a flow of how such an implementation would look like, including two users updating the same data at once, an action that triggers Azure Aware Plugin.

Azure Aware Plugin is lauded for requiring minimal effort to send the Queue Message. The Azure Function, following the creation of the queue, is automatically activated to process the message. Following this, it establishes a link to Microsoft's data service and calls API designed specifically for it to validate and create Demo record - the next operation.

The author proceeds to guide readers through preparation stages such as creating the Service Bus, Shared access policies, and registering Azure Aware Plugin. Further steps involve registering new plugin steps for the Service Endpoint and setting the plugin step for "Update - Contact." After successfully updating your data, one can check the utilization of the queue by observing the presence of the message.

The creation of Custom API is covered extensively, marking the next section. After setting up the plugin project, adjustments are made to PluginBase.cs, and the "Newtonsoft.Json" library is installed to ease the JSON deserialization process. A dozen lines of code are shared, creating an API customized for the needs of the user.

Nearing the end of the guide, Azure Function creation is discussed. With your Service Bus Queue in place, a new policy for Management needs to be created and will then be used to code the Azure Function in Visual Studio. Azures Function essentially achieves the reception of a message, connecting to Microsoft's data service, and calling the earlier created API.

Once all is complete, testing of the Azure Function can be performed on local machines. If all tests clear, deployment of the function for Azure hosting is the next step. Deployment will need the confirmation of a new Function or selection of an existing one, with the published Function App requiring the creation of ServiceBusConnection.

The blog post confirms that the system will accept the first request but reject the second one. However, it's noted that the error will only be visible from the Plugin Trace Log. The post concludes by wishing the readers "Happy CRM-ing!"

Enhancing Data Service with Azure

In a broad sense, the integration of Azure Service Bus Queue with Microsoft's data service presents an optimized way of managing data processing. It enables requests to be well-ordered, ensuring correctness and integrity in data operations. Plugins like the Azure Aware Plugin holds a pivotal role in streamlining the process, lowering the effort needed and bridging the communication between different entities like the queue and the Azure Function. Custom API aids in tailoring operations to the specific needs of the users, while Azure Function establishes secure and reliable links for smooth process flow. Ultimately, the integration promises a more efficient system of data handling, germane to both businesses and end-users.

For more information on Microsoft’s data service integration, you can click here .

Read the full article Dataverse – Azure Aware Plugin + Service Bus Queue + Azure Function + Dataverse Custom API

Microsoft Dataverse - Dataverse-Azure Plugin, Service Bus Queue & Custom API

Learn about Dataverse – Azure Aware Plugin + Service Bus Queue + Azure Function + Dataverse Custom API

Understanding and implementing Microsoft's Azure Service Bus Queue with the Dataverse platform is an interesting and complex process that can greatly enhance the efficiency and reliability of your data management. The flow created by this integration ensures that data is processed in the correct order, even when there are simultaneous update attempts.

In this tutorial, several key steps were highlighted for this implementation. Beginning by preparing the Service Bus, creating a new queue is initiated after you've made your Service Bus Name. You also need to come up with shared access policies that would later be utilized on the Dataverse platform.

The Azure Aware Plugin is then registered which helps to send the Queue Message with minimal effort. After the queue is created, the Azure Function will kick in and process this message. It then develops a link to the Dataverse platform and calls the Custom API for validation and record generation.

Creating the Custom API is a fairly technical process and involves some coding. The API constructed in the tutorial takes in two parameters - a JSON object containing the UserID and the updated state of the contact for validation purposes. Understanding this process is vital as this helps you avoid certain errors in the future.

If correctly set up, the Azure Function can be used to confirm the success of the implementation. This function is actually pretty simple – it gets the message, creates the connection, and just calls the API. If all is well, these functions can be deployed to be hosted on Azure, creating a seamless integration with your Dataverse for efficient and precise data management.

In the end, the system will accept the first request but deny the second one. It is important to remember that the architecture design ensures that any error will not be displayed to the user. It can only be observed through the Plugin Trace Log.

This integration takes a deep understanding of Azure, Service Bus Queues, the Dataverse platform, and coding languages like C#, Json, and .NET. Although it might appear complex at first glance, step-by-step implementation coupled with hands-on practice would aid in a better understanding.

By mastering these skills, you would be able to leverage the Service Bus and the Dataverse platform's capabilities to create reliable, efficient, and secure data management systems.

  • Microsoft Service Bus Name Creation
  • Shared access policies
  • Azure Aware Plugin
  • Azure Functions & API Integration
  • Coding languages like C#, Json, and .NET

More links on about Dataverse – Azure Aware Plugin + Service Bus Queue + Azure Function + Dataverse Custom API

Dataverse – Azure Aware Plugin + Service Bus Queue + ...
Mar 26, 2023 — Today, we will learn how to make use of the Azure Service Bus Queue to be implemented alongside Dataverse. The idea is Azure Service Bus ...
Write a custom Azure-aware plug-in
Jun 19, 2023 — Learn how to write plug-in code that can post a message or the execution context of the current database transaction to the Azure Service ...
Dataverse – Azure Aware Plugin + Service Bus Queue + ...
Mar 25, 2023 — Today, we will learn how to make use of the Azure Service Bus Queue to be implemented alongside Dataverse. The idea is Azure Service Bus ...

Keywords

Dataverse Azure Plugin, Service Bus Queue, Azure Function, Dataverse Custom API, Azure Aware Plugin, Dataverse Azure Integration, Azure Service Bus with Dataverse, Azure Function in Dataverse, Custom API in Dataverse, Dataverse and Azure Function Integration.