title: Azure CI/CD - Azure Private Npm Registry - Unable to authenticate, need: Bearer authorization_uri=https://login.windows.net
body: <p>We have a private npm registry (library) for our Angular UI because of this we can't run npm install before authenticating the private registry. The registry is in a different Azure organization. When I work on a local machine for the first time, I run this code, (npm install -g vsts-npm-auth --registry <a href="https://registry.npmjs.com" rel="nofollow noreferrer">https://registry.npmjs.com</a> --always-auth false) and then this code (vsts-npm-auth -config .npmrc), then pop up appear and I need to input my credentials, like username and password after that I can now use npm install to install packages from my private registry.</p>
  <p>In azure CI pipe-line there is no user interaction so what I did was, I created a service connection with username(organization username) and password(organization password) and the package URL which I have found in .npmrc file. I then use the service connection in NPM Authenticate Task to authenticate the registry but it throws me an error when npm install run. I have posted the error pic below. Can anyone please help me to authenticate the private registry to install packages. Thanks</p>
  <p><a href="https://i.stack.imgur.com/tGZH6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tGZH6.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/vrxub.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vrxub.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/uaHPR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uaHPR.png" alt="enter image description here" /></a></p>