I am trying to connect in the premises of Dynamic CRM 2016 from an asp.net web project. I am using the CrmServiceClient method with Active Directory authentication mode.
I get the following exception.
{"Unable to load type" Microsoft.IdentityModel.Clients.ActiveDirectory.PromptBehavior "from the assembly" Microsoft.IdentityModel.Clients.ActiveDirectory, Version = 3.10.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 ".:" Microsoft.IdentityModel.Clients. ActiveDirectory.PromptBehavior "}
new CrmServiceClient( new System.Net.NetworkCredential("adminuser", "pass", "domain"), Microsoft.Xrm.Tooling.Connector.AuthenticationType.AD, "http://sample.com", "4466", "DEV", useUniqueInstance:false, useSsl:false)
Also tried this
new CrmServiceClient(ConfigurationManager.ConnectionStrings["CRM_CONN"].ConnectionString)
source share