Created
April 12, 2021 13:09
-
-
Save martyncoup/0ac8126f011b4185e6567b994ee66553 to your computer and use it in GitHub Desktop.
Call Azure API through downstream web API service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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