Authenticate users in Dynamics 365 Customer Engagement (on-premises)

Dynamics 365 Customer Engagement (on-premises) support three security models for authentication: claims-based authentication, Active Directory authentication, and OAuth 2.0 (IFD only). The type of authentication used depends on the type of deployment your application is accessing (on-premises, or Internet Facing Deployment (IFD)) and if your application is using the Web API or the Organization Service endpoint.

In addition to using the correct security model, applications must establish a communication channel with the Dynamics 365 Customer Engagement (on-premises) web services on the target deployment. The SDK run-time assemblies use Windows Communication Foundation (WCF) technology to establish this communication channel.

The SDK assemblies simplify use of WCF technology and claims-based authentication by providing helper proxy classes that make it easy to write applications that connect to and authenticate with the Dynamics 365 Customer Engagement (on-premises) web services. By using these helper classes in your application, you can access any Dynamics 365 Customer Engagement (on-premises) deployment using the same code and you don’t have to become an expert in claims-based security or WCF programming.

Tip

There are a number of different methods with supporting classes in the SDK to authenticate a custom .NET application or service with the web service endpoints. The recommended class to use in this release is the CrmServiceClient class. That class supports all Customer Engagement (and Dataverse) deployments, is multi-threading safe, and is easy to use. For more information about other available classes, see Active Directory and Claims-Based Authentication.

Use OAuth with Dataverse
Use OAuth with Cross-Origin Resource Sharing to connect a Single Page Application
Build web applications using Server-to-Server (S2S) authentication

See Also

Active Directory and Claims-Based Authentication
Use connection strings in XRM tooling to connect to Dynamics 365 Customer Engagement (on-premises)
Use the Dynamics 365 Customer Engagement Web API
Use the Dynamics 365 Customer Engagement Organization Service