-
-
Save justinyoo/e469c4607dcaeb68b340f0ae1e1311a9 to your computer and use it in GitHub Desktop.
Application Insights WebTests SDK
This file contains 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 clientId = "CLIENT_ID"; | |
var clientSecret = "CLIENT_SECRET"; | |
var aad = "https://login.microsoftonline.com/[TENANT_NAME].onmicrosoft.com"; | |
var url = "https://management.core.windows.net/"; | |
var subscriptionId = "SUBSCRIPTION_ID"; | |
var context = new AuthenticationContext(aad, false); | |
var cc = new ClientCredential(clientId, clientSecret); | |
var result = await context.AcquireTokenAsync(url, cc).ConfigureAwait(false); | |
var credential = new TokenCloudCredentials(subscriptionId, result.AccessToken); | |
var client = new ResourceManagementClient(credential); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment