Hi,
I am trying to acquire Token using certificate to connect Graph API. Its works in console application and local IIS express.
However, when hosted same in IIS it get stuck and timed out.
var msalClient = ConfidentialClientApplicationBuilder
.Create(config.ClientID)
.WithCertificate(GetCertificateByThumbprint(config.ApplicationThumbprint))
.WithAuthority(AadAuthorityAudience.AzureAdMyOrg, true)
.WithTenantId(config.TenantID)
.Build();
result = await msalClient.AcquireTokenForClient(scopes).ExecuteAsync(); // ****Gets Stuck** - IT DOES NOT EVEN GO TO NEXT STEP**
requestMessage.Headers.Authorization =
new AuthenticationHeaderValue("bearer", await GetAccessTokenAsync());
var users = await graphClient.Users.Request().Filter($"mail eq '{emailAddress}'").GetAsync();
I have createD ASP.NET MVC for poc and will convert into Web API.
I do not want to use user login token or such... There is no login page and we want to interact MS Graph API using application specific Client ID.
Please some one help on this.
thank you!