public XrmService(IOptions <CrmOptions> options) { var o = options.Value; var authentication = new ServerToServerAuthentication(o.CrmApplicationID, o.CrmApplicationKey, o.CrmOrganizationURL, o.CrmTenantId); this.client = new WebApi(authentication); }
public ApiConnectionTest() { if (!crmConnectionString.ToUpper().Contains("HML")) { throw new System.Exception("Must be HML Environment"); } var serverToServerAuthentication = new ServerToServerAuthentication(crmConnectionString); WebApi = new WebApi(serverToServerAuthentication); }