microsoft / azure-devops-dotnet-samples

.NET/C# samples for integrating with Azure DevOps Services and Azure DevOps Server
https://docs.microsoft.com/azure/devops/integrate
MIT License
522 stars 519 forks source link

materializing a new service account succeeds, but how do I verify that the new service account now has access? #220

Closed sherkhan911 closed 5 years ago

sherkhan911 commented 5 years ago

I am not able to generate a pat token for a service account that I materialised using the code sample give, I have a doubt on the values used in the sample:

  1. do I need to change the guids used below: AuthenticationResult result = ctx.AcquireTokenAsync("499b84ac-1321-427f-aa17-267ca6975798", "872cd9fa-d31f-45e0-9eab-6e460a02d1f1", new UserPasswordCredential(userName, password)).Result;

  2. What should be this value modified to: const string accountName = "account"; I am trying to grant access to office.visualstudio.com

danhellem commented 5 years ago

The Office account may have some policies in place blocking you. Please email me directly via microsoft email and we can take this offline.

dahellem@microsoft.com