A team is building a new .NET 8 console application that connects to Dataverse with a Microsoft Entra ID app registration and uses the Organization service programming model with Entity and IOrganizationService. Which client library should the team use?
Select an answer to reveal the explanation.
Short Explanation
ServiceClient is the modern way in: it runs on today's .NET and speaks the same IOrganizationService language you already know. CrmServiceClient is its .NET Framework grandparent, and OrganizationServiceProxy is retired. Pick the one built for .NET 8.
Full Explanation
Microsoft.PowerPlatform.Dataverse.Client provides the ServiceClient class, the current client for the Dataverse SDK for .NET. It implements IOrganizationService, supports modern .NET as well as .NET Framework, and authenticates with Microsoft Entra ID, including client credentials for an app registration that has an application user in the environment. It also handles service protection errors by pausing and retrying after the Retry-After duration. CrmServiceClient in the XrmTooling package targets .NET Framework only, so it is not the right choice for a .NET 8 application; ServiceClient is its successor with a largely compatible surface. OrganizationServiceProxy is a deprecated low-level class tied to the Office365 authentication type, and Microsoft directs developers to replace it with ServiceClient or CrmServiceClient. Building on HttpClient and an internal web service proxy bypasses the supported client and would require reimplementing authentication, retry and serialization; if the team wanted raw HTTP, the Web API would be the documented choice, but that abandons the Organization service programming model the team requires. Exam caveat: ServiceClient is for client applications; plug-ins obtain IOrganizationService from the execution pipeline and must not create their own client. Operational check: create a ServiceClient with a connection string using ClientSecret or certificate authentication, call WhoAmI, and confirm the returned user ID is the application user.