Hello ,
Hope You are doing well.
I am one of the developers working on Microsoft technologies.
I have a query about the WS-Trust authentication protocol which is going to be retired soon.
I am using below different approaches for the Dynamics CRM authentication.
Online Authentication
var conn = new CrmServiceClient($@"AuthType=ClientSecret;url={organizationUri};ClientId={clientId};ClientSecret={clientSecret}");
conn.OrganizationWebProxyClient.InnerChannel.OperationTimeout = new TimeSpan(0, Convert.ToInt16(ConfigurationManager.AppSettings["MDC_ServiceTimeOut"]), 0);
return conn.OrganizationWebProxyClient != null ? conn.OrganizationWebProxyClient : (IOrganizationService)conn.OrganizationServiceProxy;
OnPremise Authentication
String connstr = "authtype=Office365;Url=" + _OrganizationUri + ";Domain=" + _domain + ";Username=" + _userName + ";Password=" + _password + "";
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
CrmServiceClient conn = new CrmServiceClient(connstr);
if (conn.IsReady)
{
service = conn.OrganizationWebProxyClient != null ? (IOrganizationService)conn.OrganizationWebProxyClient : (IOrganizationService)conn.OrganizationServiceProxy;
}
So for the above, all two approaches do I need to make any changes?
Please guide me on this.
Your help would be really appreciated.
Awaiting Your positive reply.