I am using the following code to try and connect to Azure DevOps and to retrieve a list of work item types, however I keep getting this exception:
BrowserFlowException: SP324098: Your browser could not complete the operation
There doesn't seem to be much information around this exception. Does anyone know what's going on here? I am using Visual Studio 2017, Enterprise Edition updated to latest build on a Windows 10 updated to latest build machine.
VssClientCredentials credentials = new VssClientCredentials();
VssClientHttpRequestSettings settings = new VssClientHttpRequestSettings
{
AllowAutoRedirect = true
};
VssHttpMessageHandler vssHandler = new VssHttpMessageHandler(credentials, settings);
using (VssConnection connection = new VssConnection(this.CollectionUri, credentials, settings))
{
connection.ConnectAsync().SyncResult();
// Create instance of WorkItemTrackingHttpClient using VssConnection
WorkItemTrackingHttpClient witClient = connection.GetClient<WorkItemTrackingHttpClient>();
var workItemTypes = witClient.GetWorkItemTypesAsync(ProjectName).SyncResult(); ; //exception happens here, I see the login box here too
}