Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Connector to a Cloud Azure DevOps nuget feed returns (401) Unauthorized using username/password but work using PAT
-
Hey there,
I'm getting the following error when trying to access one of our https://pkgs.dev.azure.com instance feed:
System.Net.WebException: The remote server returned an error: (401) Unauthorized. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
I get this error when I create the connector using my username (Username@__domain__.com) and matching password.
If I create a personal access token (PAT) for this user on the Azure Devops cloud Instance then create a the connector using token username and the token value as password it works just fine.
Are Username and Password not suppported for Azure DevOps cloud feed?
It's annoying because our PAT are valid for only 1 year and it adds some PAT managing we would like to avoid.
Thanks,
Nicolas
-
I believe Azure DevOps NuGet feeds depricated alternate credentials back in March and they will only support PATs moving forward. Here is an article on the deprication Azure DevOps Will No Longer Support Alternate Credentials.
I know you were sepcifying your Azure AD username and password, but I believe Microsoft treated those as an alternate method because the normal Azure AD login requires OAuth based logins moving forward. The PAT was their solution for adding a way to authenticate without requiring a user to intervene in the login process.
Thanks,
Rich
-
Hey @rhessinger
Thanks a lot for the incredibly fast answer.
I will try to find a solution on our side with DevOps then.Have a nice day,
Nicolas
-
No problem! If you are still having issues after you reach out, please feel free to reply back to this topic.
Thanks,
Rich
-
This post is deleted!
-
This post is deleted!