microsoft / microsoft/vscode-azureresourcegroups

Azure VSCode extension continuously repeats GitHub authentication

Open
#1,204 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
78
Forks
55
Avg merge
16h 49m
Merged PRs (30d)
139

Description

This is a bit of a complicated issue, so I'll try to explain it.

First, the symptom that I see is in VSCode, when I have the Azure Resources extension installed, it can get into a state where it continuously repeats GitHub authentication. Yes, I know Azure and GitHub are not directly related, but this is what I'm seeing. The messages are shown in the VSCode Output panel for GitHub Authentication, and they look like the following and are repeated continuously.

2025-08-19 16:54:18.347 [info] Getting sessions for all scopes...
2025-08-19 16:54:18.347 [info] Got 5 sessions for ...
2025-08-19 16:54:54.675 [info] Getting sessions for all scopes...
2025-08-19 16:54:54.678 [info] Got 5 sessions for ...
2025-08-19 16:54:54.683 [info] Getting sessions for read:user,repo,user:email,workflow...
2025-08-19 16:54:54.684 [info] Got 1 sessions for read:user,repo,user:email,workflow...

This is a problem because it ends up using the GitHub API, which can expire your rate limit. You can check the usage via a command like curl -H "Authorization: token <GITHUB_PERSONAL_TOKEN>" https://api.github.com/rate_limit. Which shows something like the following (I've excluded the uninteresting bits):

{
  "resources": {
    "core": {
      "limit": 5000,
      "used": 3376,
      "remaining": 1624,
      "reset": 1755591629
    },
    ⠇
    "code_scanning_upload": {
      "limit": 5000,
      "used": 3376,
      "remaining": 1624,
      "reset": 1755591629
    },
    ⠇
  },
  "rate": {
    "limit": 5000,
    "used": 3376,
    "remaining": 1624,
    "reset": 1755591629
  }
}

I've been able to temporarily solve this problem by clicking on the Accounts icon in the bottom-left in VSCode, going to my Microsoft account (the one I use for logging into Azure), and logging out. If I then go to the Azure Resources panel it says I need to Sign in to Azure. If I do that, it logs in successfully and the problem is no longer happening. But, the problem resurfaces at some time later. I'm not sure what causes it to start again. It might be related to opening VSCode on another machine that has settings sync enabled, but I'm not sure that is what causes it to happen again.

I mentioned the Azure Resources extension as a problem, but I believe this may happen with any Azure extension, like Azure Functions, Azure Databases, etc. In fact, I'm not even 100% sure the issue is related to these extensions. It may be entirely related being logged into my Microsoft account.

I also don't know why these Azure extensions have interactions with GitHub authentication. One thing I did notice is that if I go to Account in VSCode, click on my Microsoft account, and then click on Manage Trusted Extensions then a list of trusted extensions is shown, one of which is GitHub Copilot Chat, so this implies at least some connection between this account an GitHub.

Let me know if there is anything I can do to help investigate this problem more.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the repeated requests in VSCode's GitHub Authentication Output panel with the Azure Resources extension installed, then compare behavior before and after signing out of the Microsoft account and signing back in. Use the reported curl rate_limit command to verify API usage; done means authentication no longer loops or consumes requests unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, github, typescript, vscode
Domain
authentication, cloud, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.