Skip to content

Instantly share code, notes, and snippets.

@martyncoup
Created April 12, 2021 13:04
Show Gist options
  • Save martyncoup/338fc192b162d539f680ee3913382d3e to your computer and use it in GitHub Desktop.
Save martyncoup/338fc192b162d539f680ee3913382d3e to your computer and use it in GitHub Desktop.
Enable token acquisition for downstream APIs
services.AddMicrosoftIdentityWebApiAuthentication(Configuration, "AzureAd")
.EnableTokenAcquisitionToCallDownstreamApi()
.AddDownstreamWebApi("Azure", Configuration.GetSection("AzureApi"))
.AddInMemoryTokenCaches();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment