Skip to content

Commit 3e099ed

Browse files
Update Program.cs
1 parent 9865fbb commit 3e099ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ManagedClientConsoleAppSample/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static void Main(string[] args)
3232
{
3333

3434
//PromptBehavior.RefreshSession will enforce an authn prompt every time. NOTE: Auto will take your windows login state if possible
35-
result = ctx.AcquireTokenAsync(azDevResourceId, clientId, new Uri(replyUri), promptBehavior).Result;
35+
result = ctx.AcquireTokenAsync(azureDevOpsResourceId, clientId, new Uri(replyUri), promptBehavior).Result;
3636
Console.WriteLine("Token expires on: " + result.ExpiresOn);
3737

3838
var bearerAuthHeader = new AuthenticationHeaderValue("Bearer", result.AccessToken);
@@ -41,7 +41,7 @@ public static void Main(string[] args)
4141
catch (UnauthorizedAccessException)
4242
{
4343
// If the token has expired, prompt the user with a login prompt
44-
result = ctx.AcquireTokenAsync(azDevResourceId, clientId, new Uri(replyUri), promptBehavior).Result;
44+
result = ctx.AcquireTokenAsync(azureDevOpsResourceId, clientId, new Uri(replyUri), promptBehavior).Result;
4545
}
4646
catch (Exception ex)
4747
{
@@ -72,7 +72,7 @@ private static void ListProjects(AuthenticationHeaderValue authHeader)
7272
// use the httpclient
7373
using (var client = new HttpClient())
7474
{
75-
client.BaseAddress = new Uri(vstsCollectionUrl);
75+
client.BaseAddress = new Uri(azureDevOpsOrganizationUrl);
7676
client.DefaultRequestHeaders.Accept.Clear();
7777
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
7878
client.DefaultRequestHeaders.Add("User-Agent", "ManagedClientConsoleAppSample");

0 commit comments

Comments
 (0)