Skip to content

Instantly share code, notes, and snippets.

@justinyoo justinyoo/ClientCredential.cs Secret
Created Jun 20, 2016

What would you like to do?
Application Insights WebTests SDK
var clientId = "CLIENT_ID";
var clientSecret = "CLIENT_SECRET";
var aad = "[TENANT_NAME]";
var url = "";
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
You can’t perform that action at this time.