Using NuGet feed of private azure devops projects with oauth2 not working

I tried to use nuget feed of private project in rider. Using nuget.config to setup the feed works. At first try to get packages results in oauth2 window to enter my user credentials. 

After autentification successfully, the list of available packages is empty. Using visual studio does work. 

Does someone know this issue?

Comment actions Permalink


Could you please enable "NugetAll" tracing in the menu "Help | Diagnostic tools | Choose trace scenario", then reproduce this issue, collect all logs via "Help | Collect logs", disable tracing, and share the log bundle with us via creating a new support request or a ticket on Rider tracker

Comment actions Permalink

Hi, has this issue been solved? I have the same problem.

Comment actions Permalink


Same here, same issue... When i added the new feed from, it doesn't complain but first popped out an OAuth window which i fill successfully then nothing appears in the nuget feed...


Comment actions Permalink

I found this and it works for me :


Credential providers for private NuGet feeds

JetBrains Rider lets you authenticate to private NuGet feeds that use with different authentication methods.

Authentication prompt for username/password combination

In the Sources tab of the NuGet window, you can edit or add a feed and add credentials in the form of a username/password combination.

The URL to private feeds is often shared with team members in the NuGet.config file that sits next to the solution file, so that everyone on the team can connect to such private feed. On the first load of such solution where package restore is required, JetBrains Rider will prompt for credentials.

When credentials are correct, they are stored in JetBrains Rider’s password store so that you don’t have to re-enter credentials each time you access a NuGet feed. The password store is configurable on the Appearance and Behavior | System Settings | Passwords page of the Settings/Preferences ⌘,.

Comment actions Permalink


Please try the following scenario:

0) Check that the user you use to login to your NuGet Feed has permissions to read from the feed;

1) Restart Rider via the action "File | Invalidate cache / Restart | Invalidate and Restart";

2) Open your project and wait until you see a popup by Microsoft to enter your credentials;

3) Enter the proper credentials, switch to the "Packages" tab of the NuGet tool window, press "Refresh" button, wait until this process finishes, and check if the issue persists.


Please let me know about the results.


Comment actions Permalink

Hello Sofia. I am facing the same problem and tried your solution. Unfortunately the problem still occurs

Comment actions Permalink


Can you please collect and share the following data in a new youtrack ( ticket?

- ~/.config/NuGet/NuGet.Config

- logs, collected with the enabled "NugetAll" tracing option in "Help | Diagnostic tools | Choose trace scenario". Enable it, then reproduce this issue, collect all logs via "Help | Collect logs", disable tracing.


Thank you in advance.



Comment actions Permalink

I had the same issue, I was using the device login instead of oAuth. Why it was not working for me was nuget.exe was not in the path.

I installed Azure Artifacts credential provider,

Downloaded latest version of nuget.exe

Added the location of nuget.exe to the path



Comment actions Permalink

I almost give up on Rider but managed to get the solution from Frankkubis to work. Details below in case it helps someone else.


  • Linux - Ubuntu 21.04 with Gnome
  • Rider 2021.1.5
  • Developing solutions with .NET Core 3.1
  • Feed: (parts in bold were redacted for my company's privacy.)


  • Trying to get at custom NuGet packages from a custom feed in Azure DevOps (formerly VSTS) Packages/Artifacts.

What Did Not Work:

  • Rider would not prompt me for credentials 
  • Entering credentials in the Rider NuGet window Sources tab did not help
  • Manually editing the csproj to include a NuGet reference to a package on my custom feed did not help
  • File | Invalidate Caches did not help
  • Installing NuGet cli for Linux did not help
  • Changing Rider's NuGet settings under Credential Providers to "NuGet/.NET CLI Plugins, then Rider integrated" did not help (or... it didn't help by itself)
  • Restarting Rider after doing any of these various things did not help

The NuGet window Log tab just kept saying that I had cancelled the request to get the packages from my feed. 

What Gave Me A Clue:

  • Used the Linux CLI to run "dotnet restore --interactive"
  • Before I modified my csproj file to manually add the reference to my custom package, it gave no indication anything was wrong
  • After I modified my csproj file to manually add the reference, it told me:

usr/share/dotnet/sdk/3.1.411/NuGet.targets(128,5): error : Unable to load the service index for source [/home/shaun/repos/my-company-name/my-solution-directory/my-solution.sln]

/usr/share/dotnet/sdk/3.1.411/NuGet.targets(128,5): error : Response status code does not indicate success: 401 (Unauthorized). [/home/shaun/repos/my-company-name/my-solution-directory/my-solution.sln]

Followed Frankkubis's link and followed the installation instructions for Linux.

Then, I performed a "dotnet restore --interactive" again from the Linux CLI. This gave me a URL to visit and a code to enter on the page. I followed the page, authenticated (to Microsoft) and entered the code. The .NET restore worked.

Finally, I restarted Rider. Now, the NuGet window Logs tab shows success and all of my custom NuGet packages show up!

I don't blame Jetbrains. I blame Microsoft. Microsoft LOVES to be convoluted.

Nevertheless, this should be a lot easier in Rider than it is. When I'm in the CLI, I expect to (and enjoy) have to do a lot fussing. When I'm in a GUI, I expect it to lead me on the garden path.

Otherwise, I'm loving Rider and loving being able to develop without the Windows VM.

Comment actions Permalink

Hi there,

Thanks to everybody who shared their workaround. 

There is an issue on Rider's tracker for this problem: A dedicated developer is on it. 



Comment actions Permalink

For those who are still having issues with authentication on linux: I wrote a simple script that uses the azure cli tool from Microsoft to automatically generate a PAT that lasts 1 year and then updates the NuGet credentials on your machine. The script can be found here:

I was unable to get it to work properly even with the Azure Credentials Provider. I had to re-authenticate every day in order to stay authenticated. This script authenticates you to the NuGet repository until the PAT expires. You must set the credential provider to "NuGet/.NET CLI plugins" in Rider.

I hope this helps!


Please sign in to leave a comment.