title: TF400813: Resource not available for anonymous access. Client authentication required
body: <p>I am working on the CodedUI Test Automation project. i am developing a framework in which i am trying to access Test Cases in <code>VSTS</code> through <code>RestAPI</code>. I have worked on an MVC application previously in which i did the same thing to pull data from <code>VSTS</code> using <code>RestAPI</code>.<br><br>
  Now the problem is i am not able to access the <code>VSTS</code>. Everytime i am trying to access the <code>VSTS</code>, i got the exception <code>TF400813: Resource not available for anonymous access. Client authentication required</code>. 
  <br>
  I am using the same <code>PAT token</code>. I have all the required access on my team project. I am able to access all work items in my project from browser. I have tried all the option mentioned in below thread but still its not working.<br>
  <a href="https://stackoverflow.com/questions/38516736/client-authentication-error-when-starting-visual-studio-2015-3">Client authentication error when starting Visual Studio 2015.3</a><br>Any leads will be appreciated.<br>Below is my code to get data from <code>VSTS</code>:<br></p>
  
  <pre><code>public static List&lt;WorkItem&gt; GetWorkItemsWithSpecificFields(IEnumerable&lt;int&gt; ids)
  {
      var collectionUri = "https://&lt;name&gt;.visualstudio.com";
      var fields = new string[] {
          "System.Id",
          "System.Title",
          "System.WorkItemType",
          "Microsoft.VSTS.Scheduling.RemainingWork"
      };
      using (WorkItemTrackingHttpClient workItemTrackingHttpClient = new WorkItemTrackingHttpClient(new Uri(collectionUri), new VssBasicCredential("", System.Configuration.ConfigurationManager.AppSettings["PATToken"])))
      {
          // Exception is coming on below line
          List&lt;WorkItem&gt; results = workItemTrackingHttpClient.GetWorkItemsAsync(ids, fields).Result;
          return results;
      }
  }
  </code></pre>