New Azure subscription, fails to refresh access token
I have a new Azure subscription and I want to demo it using GitHub Codespaces. However, when I try to sign in with the Azure Resources extension, the only item in the sidebar bar is "Select Subscription". If I click on that, an error shows in the popup that says "Failed to refresh access token". However, if I try to access the same subscription using Visual Studio Code, it works.
I also just ran into this issue in Codespaces
@douglasstarnes Just to clarify, are you using GitHub CodeSpaces or github.dev or vscode.dev?
Does reloading the window help at all?
@alexweininger Nope. I've tried reinstalling the extension, logging out and back in, and creating a new Codespace several times. And I'm using GitHub CodeSpaces on github.com.
@douglasstarnes
Same experience here after installing the extension (Codespaces on GitHub.com or vscode.dev) and logging into my MS account:
As it turns out, after logging into your MS account, you'll need to grant additional access to your Azure resources:
Once that's been done, you should be all set:
@jazzcat, thanks for reporting the workaround. I can confirm that we are working to fix having to do the additional grant automatically.
Related to/duplicate of https://github.com/microsoft/vscode-azure-account/issues/797. I will leave this open for now until this is fixed.
Thanks @jazzcat I can confirm that this works. It didn't use to be this way. Also, I would add that to see the Grant Access to Microsoft for Azure Resources option you must first click on Select Subscription in the Azure Tool pane and let that fail. Then you will see the option to grant access and it will work.
I've verified that this issue is fixed in the current insiders release 1.80.0-insider. Try it out on insiders.vscode.dev