Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using refresh token #27

Open
terwort opened this issue Feb 2, 2022 · 15 comments · May be fixed by #35
Open

Error using refresh token #27

terwort opened this issue Feb 2, 2022 · 15 comments · May be fixed by #35

Comments

@terwort
Copy link

terwort commented Feb 2, 2022

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?

Screen Shot 2022-02-02 at 3 01 40 PM

@troywatt
Copy link

troywatt commented Feb 3, 2022

Experiencing the same issue.

@mpm-os
Copy link

mpm-os commented Feb 3, 2022

I can confirm we're having the same issue. Maybe something changed on azure side?

@MilesWellsSVT
Copy link

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!

@mpm-os
Copy link

mpm-os commented Feb 3, 2022

I believe that change was rolled back.

@MilesWellsSVT
Copy link

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.

@mauve
Copy link

mauve commented Feb 7, 2022

I am experiencing this issue today, is there a workaround available?

@MilesWellsSVT
Copy link

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

@mauve
Copy link

mauve commented Feb 8, 2022

@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
Copy link

@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 =).

@ColinKrist
Copy link
Contributor

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.

@christianacca
Copy link

@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

@ColinKrist
Copy link
Contributor

ColinKrist commented Feb 17, 2022

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.

@christianacca
Copy link

@ColinKrist, here's the PR as promised: #29

@mauve
Copy link

mauve commented Feb 20, 2022

Thanks @christianacca I tested your script and it worked for me and I can now use azure-devops-npm-auth again.

@gentoo90
Copy link

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

@gentoo90 gentoo90 linked a pull request Dec 3, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants