1

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
}
Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
Nikhil
  • 3,304
  • 1
  • 25
  • 42
  • Hi Nikhil please give a try with Shayki' code first, if you are stilling facing this issue, Here are a few things you can try: 1.Clear all your cookies for Internet Explorer (authentication is done with the Internet Explorer browser) 2. Reset IE to default settings 3.Ensure cookies are enabled in IE for url: https://{tfserverurl} 4.Some people have reported issues with VPN, so if you are using VPN, you may could try disabling the VPN to determine if it is a factor. – PatrickLu-MSFT Jul 16 '19 at 07:00
  • Thanks. I have tried everything suggested here and on various other forums but nothing seems to be working. I am going to try something radical soon and will post back the results. I faced similar problems with the older SOAP libraries (version 14.*) once and I solved them using a similar approach. Will try here too and report back. – Nikhil Jul 16 '19 at 20:27
  • 1
    I can confirm that this problem remains in specific conditions. For e.g. if you have an Outlook Add in using VSTO that authenticates against Azure DevOPS, you can reproduce this problem 100% of the time. As of now I don't have a solution to this – Nikhil Dec 08 '19 at 17:14

0 Answers0