-
Notifications
You must be signed in to change notification settings - Fork 265
Description
NuGet Product(s) Affected
Visual Studio Package Management UI
Current Behavior
While accessing private Azure DevOps feeds in Visual Studio, sometimes users may get 401 unauthorized errors because of state accounts, bad credentials etc., Visual Studio adds Unable to load service index from source: {source URL}. Response status code from the server didn't indicate success 401 (unauthorized). message to the Output -> Package Manager window and an entry to the Error List window. In few cases VS Credential Provider provides some additional information in the exception that may help customers to resolve the problem. Unfortunately, this information is not displayed to the user by NuGet.
Desired Behavior
Display VS Credential Provider additional information in the exception to the customer in Visual Studio so that the error message is more actionable. In few cases the action may resolve user error and helps customers to access their private feeds from the comfort of their VS IDE.
Additional Context
Repro steps
- Download the sample solution from authentication-demo.zip.
- Open the solution in Visual Studio.
- Navigate to the solution-level Package Manager UI.
- Visual Studio will attempt to access the private feed. During this process, a sign-in prompt will appear for the user to select an account.
- Choose a personal Microsoft account that does not have access to the feed.
- The Credential Provider will throw an exception as illustrated below: This exception was captured while debugging the NuGet Client extension.

- The exception thrown by the Credential Provider is not displayed in either the NuGet Output window or the Error List window in Visual Studio.
