Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Web API App-Only with Graph API
[HttpGet]
public async Task<IActionResult> Get()
{
AuthenticationResult authResult;
try
{
authResult = await this._authContext.AcquireTokenAsync(this._graphUrl, this._credential);
}
catch (Exception ex)
{
var result = new JsonResult(ex);
return result;
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.