azure-devops-npm-auth
azure-devops-npm-auth copied to clipboard
Error using refresh token
Hello,
We've been using this package for a very long time, and yesterday it randomly started failing with the below error. Any idea what's going on?

Experiencing the same issue.
I can confirm we're having the same issue. Maybe something changed on azure side?
Azure DevOps deprecated TLS 1.0 and 1.1 on the 31st of January. The displayed error relates to the identifiers required in the OAuth flow so I doubt that's the problem. However I just started experiencing this same issue February 1st so the timing makes me suspicious!
I believe that change was rolled back.
I believe that change was rolled back.
A coworker informed me of this and I came back to edit my comment. You're on top of it!
I wonder if the Azure common tenant for logging in users via AD has changed? I can't find anything about it from a quick search but I'm not familiar with that part of the documentation either.
I am experiencing this issue today, is there a workaround available?
I am experiencing this issue today, is there a workaround available?
Generate an access token and stick it in your user level .npmrc
https://docs.microsoft.com/en-us/azure/devops/artifacts/npm/npmrc?view=azure-devops&tabs=linux#credentials-setup
@MilesWellsSVT thanks, I should have been more precise in my comment. I was wondering if there is a workaround I can do to make this tool work again, for example change some config in Azure AD, or DevOps or so?
@MilesWellsSVT thanks, I should have been more precise in my comment. I was wondering if there is a workaround I can do to make this tool work again, for example change some config in Azure AD, or DevOps or so?
Ahh. Check out the Advanced Usage. If you can create your own app that can authenticate through AD you can supply your own ids to azure-devops-npm-auth
. I haven't tested this so I'm trusting the docs at their word =).
Has anyone had a chance to try out Advanced Usage to create your own AD application now that it's been a week? Going to try this tomorrow having a few people come to me today and tell me it's still a problem for them.
@ColinKrist, I've tried it out, and it works like a charm. I also created a powershell script that automates the app registration in Azure AD with the necessary admin consent grants required to allow azure-devops-npm-auth
to work on your behalf.
I'm going to submit a PR with this powershell script
That sounds awesome @christianacca!
I also feel to keep this package alive and well we should remove the default AD app since it's essentially broken and guide users to create their own AD apps in their respective tenants. It's not super bolts included as it once was, but at least new users wont be confused.
@ColinKrist, here's the PR as promised: #29
Thanks @christianacca I tested your script and it worked for me and I can now use azure-devops-npm-auth
again.
If you can't or don't want to create your own app, you can use the client_id
from nuget artifacts-credprovider:
872cd9fa-d31f-45e0-9eab-6e460a02d1f1
and get the tenant_id
from the response headers of your feed:
curl -v <FEED_URL> 2>&1|grep -i x-vss-resourcetenant