Uncategorized

Ditch CrmServiceClient—Embrace ServiceClient for Better Dataverse Performance!!

Recently, we faced performance issues in our custom C# application that was using CrmServiceClient to connect to Dataverse.

Upon investigation, we discovered that CrmServiceClient internally uses the Organization Service—i.e., the legacy OData V2 endpoint—for Create and Update operations.

According to Microsoft’s official documentation, use of the old OData V2 endpoints is discouraged. While the documentation mainly references client-side code, the same guidance applies to server-side implementations as well.

Microsoft recommends switching to OData V4 (Web API) even for server-side integrations. Although we initially believed that CrmServiceClient, being part of the Microsoft.Xrm.Tooling.Connector NuGet package, would abstract and handle any underlying changes automatically via DLL updates, we realized this was not the case—even when using the latest version.

We later came across an alternative: the ServiceClient class from the Microsoft.PowerPlatform.Dataverse.Client namespace. This client supports a property called UseWebApi, which defaults to false. We explicitly set it to true, and modified our connection logic to use ServiceClient instead of CrmServiceClient.

Upon testing (verified via Fiddler), we confirmed that Create, Update, and Execute operations were now using the OData V4 (Web API) endpoint. This allowed us to retain most of our existing codebase without rewriting it entirely for Web API usage with HttpClient.

Based on this experience, I strongly recommend using ServiceClient for any new tools or executables that interact with Dataverse. It offers better performance, modern authentication support, and a more future-proof architecture.

Hope this helps if you encounter a similar situation.

Uncategorized

Tip – Secure Input/Output Data in Power Automate Run History

Recently one of my colleague asked me about can we hide the sensitive input/output data which we can see in the Power Automate Run History ? This made me search and get the quick response of the available option to achieve it. (which I was really surprised I was not using)

So below is a sample Power Automate which i created to showcase this. I created a Instant flow “Run Test Flow” with Input Parameter ”Get Value” and then we will use this value to create a record in table “Custom Test A”

Usually the flow run history of one of the sample run of above flow will look as below-

As you can see you will be able to see the value entered in the field “Get Value” as “Value entered by sid”.

Now we will enable the Secure Input/Output Settings for both the steps added in the above flow considering it to be sensitive information by selecting the steps and click on Settings from ellipsis as below.

After enabling it, we will again run the flow and then open the latest run of the flow. We will see the below screen –

So now you can see that the entered value and the contents in the steps were hidden.

So using above setting we can hide the sensitive data which we don’t want to show in the Flow Run history.

Note- The data is hidden only for the flow runs after the setting is enabled and not for the past runs where the setting was disabled.

Hope this helps !!