web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Performance degradation when using CrmServiceClient and AuthType OAuth in Dataverse

(2) ShareShare
ReportReport
Posted on by 80

I've got an MVC.NET solution that calls the Dataverse API and I'm seeing a significant performance degradation when using CrmServiceClient and AuthType=OAuth compared with the (soon to be deprecated) WS-Trust connection (AuthType=Office365)

This is the code used for creating the CrmServiceClient connection (AuthType=OAuth)

var conn = new CrmServiceClient(connectionString);

var service = (IOrganizationService) conn.OrganizationWebProxyClient ?? conn.OrganizationServiceProxy;

and this is the code used for creating WS-Trust connection (AuthType=Office365)

var target = CrmConnection.Parse(connectionString);
            
target.ServiceConfigurationInstanceMode = ServiceConfigurationInstanceMode.PerName; 

var service = (OrganizationService) CrmConfigurationManager.CreateService(target, "DataverseServiceName");

has anyone experienced the same issue?

I have the same question (0)
  • Franji Profile Picture
    25 on at

    Hello,

    We too have started to get that performance degradation when we start using AuthType=OAuth, we are also using CrmServiceClient to connect.

    Have you found any solution? The truth is that it is penalizing us a lot.

  • juancho Profile Picture
    80 on at

    In our case the issue was that we were using an old version of the CrmSdk, using the latest version (9.0.2.42) solved our problem

    www.nuget.org/.../9.0.2.42

    We also have issues with impersonation when setting the caller id (docs.microsoft.com/.../microsoft.xrm.tooling.connector.crmserviceclient.callerid, if you are running several threads and initiating multiple connections with different callerids, we found that it's not thread safe and some calls to impersonate one user might get mixed up by another user even if:

    - disablecrossthreadsafeties is set to false (docs.microsoft.com/.../microsoft.xrm.tooling.connector.crmserviceclient.disablecrossthreadsafeties

    - RequireNewInstance is set to true (docs.microsoft.com/.../use-connection-strings-xrm-tooling-connect

    We ended up having to cache each IOrganizationService per callerid to prevent it

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 197 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans