File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ namespace DeviceProfileSample
14
14
public class Program
15
15
{
16
16
//============= Config [Edit these with your settings] =====================
17
- internal const string vstsCollectionUrl = "http ://myaccount.visualstudio.com" ; //change to the URL of your VSTS account
17
+ internal const string vstsCollectionUrl = "https ://myaccount.visualstudio.com" ; //change to the URL of your VSTS account; NOTE: This must use HTTPS
18
18
//==========================================================================
19
19
20
20
internal const string VSTSResourceId = "499b84ac-1321-427f-aa17-267ca6975798" ; //Static value to target VSTS. Do not change
@@ -27,8 +27,9 @@ public static void Main(string[] args)
27
27
try
28
28
{
29
29
DeviceCodeResult codeResult = ctx . AcquireDeviceCodeAsync ( VSTSResourceId , clientId ) . Result ;
30
+ Console . WriteLine ( "You need to sign in." ) ;
31
+ Console . WriteLine ( "Message: " + codeResult . Message + "\n " ) ;
30
32
result = ctx . AcquireTokenByDeviceCodeAsync ( codeResult ) . Result ;
31
- Console . WriteLine ( "Token expires on: " + result . ExpiresOn ) ;
32
33
33
34
var bearerAuthHeader = new AuthenticationHeaderValue ( "Bearer" , result . AccessToken ) ;
34
35
ListProjects ( bearerAuthHeader ) ;
You can’t perform that action at this time.
0 commit comments