namespace webAPILogin
{ class ConnecttOAzure { static Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext authContext; static AuthenticationResult authToken; static string apiUrl = "https://ABC.api.crm11.dynamics.com" static string clientId = "" static string redirectUrl = "" internal static async void GetToken() { try { ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; AuthenticationParameters ap = AuthenticationParameters.CreateFromUnauthorizedResponseAsync(new Uri(apiUrl)).Result; string resourceUrl = ap.Resource; string authorityUrl = ap.Authority; authContext = new Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext(authorityUrl, false);
Need to create CLR, so it can be used in T-SQL. trips at this line AuthenticationParameters ap = AuthenticationParameters.CreateFromUnauthorizedResponseAsync(new Uri(apiUrl)).Result;
argument 1: cannot convert from 'system.uri' to 'storm.net.http.httpresponsemessage'
Aucun commentaire:
Enregistrer un commentaire