Skip to content

Instantly share code, notes, and snippets.

@martyncoup
Created April 12, 2021 13:09
Show Gist options
  • Save martyncoup/0ac8126f011b4185e6567b994ee66553 to your computer and use it in GitHub Desktop.
Save martyncoup/0ac8126f011b4185e6567b994ee66553 to your computer and use it in GitHub Desktop.
Call Azure API through downstream web API service
var response = await _downstreamWebApi.CallWebApiForAppAsync(
"AzureApi",
options =>
{
options.BaseUrl = "https://management.azure.com";
options.HttpMethod = HttpMethod.Get;
options.RelativePath = "subscriptions/<sub id>/resourcegroups?api-version=2020-09-01";
options.Scopes = "https://management.azure.com//.default";
options.Tenant = "<tenant id>";
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment