Instantly share code, notes, and snippets.

What would you like to do?
public async Task<IActionResult> CallApiUsingUserAccessToken()
var accessToken = await HttpContext.GetTokenAsync("access_token");
var client = new HttpClient();
var content = await client.GetStringAsync("http://localhost:5001/api/resource-with-policy");
return View("Json", content);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment