private static CompanyContactsAPI CompanyContactsAPIClientWithAuth() { var client = new CompanyContactsAPI(new Uri(ConfigurationManager.AppSettings["CompanyContactsAPIUrl"])); client.HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", ServicePrincipal.GetS2SAccessTokenForProdMSA().AccessToken); return client; }
private static CompanyContactsAPI CompanyContactsAPIClientWithAuth() { var client = new CompanyContactsAPI(new Uri(ConfigurationManager.AppSettings["CompanyContactsAPIUrl"])); client.HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", ServicePrincipal.GetS2SAccessTokenForProdMSA().AccessToken); return(client); }