Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
private async Task<string> GetTokenAsync(string appId, X509Certificate2 certificate, string tenantId)
var app = ConfidentialClientApplicationBuilder.Create(appId)
var scopes = new[] { "" };
var result = await app.AcquireTokenForClient(scopes).ExecuteAsync();
return result.AccessToken;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment