How to Choose the GitHub Copilot Account for a VS Code Workspace
🔍 WiseChecker

How to Choose the GitHub Copilot Account for a VS Code Workspace

VS Code can select a GitHub account for Copilot without deleting all of your saved GitHub credentials. For GitHub.com accounts, use the extension’s account preference in the workspace and profile where you are working.

This is useful when your employer provides Copilot on a work account while you also keep a personal account signed in. Choose the identity authorized for the project before sending its content to an AI service.

ADVERTISEMENT

1. Confirm which account should provide access

Check the exact GitHub username, not just a display name or email address. Ask your administrator which account received the organization’s seat if there is any doubt. Do not switch to a personal subscription to work around an employer’s restrictions.

You can inspect your current license in GitHub account settings. GitHub’s plan guide identifies Billing & licensing → Licensing, or Billing and licensing → Plans and usage on the original billing platform. This is a check, not a request to purchase or cancel anything.

Record which account is intended for the project. Do not assume changing Copilot also changes Git commit attribution, repository credentials or your Settings Sync account. Treat those as separate checks when setting up a work environment.

2. Select the Copilot account in the current window

Open the intended folder or workspace and make sure the expected VS Code profile is active. Then follow the documented account-selection procedure:

  1. Open Accounts in the Activity Bar.
  2. Choose Manage Extension Account Preferences.
  3. Select GitHub Copilot Chat.
  4. Choose the GitHub.com account you want Copilot to use.

The preference is scoped to the current workspace and profile. If the intended account is not available, sign in through VS Code’s Copilot sign-in flow and verify the browser’s displayed account before authorizing. Do not accept a login for the wrong identity simply to dismiss the prompt.

Test with a short, non-sensitive request. Confirm the account selection again after reopening this workspace. You do not need to sign out unrelated accounts just because they appear in the menu.

ADVERTISEMENT

3. Handle profiles and enterprise accounts deliberately

VS Code profiles can be associated with folders and workspaces. Check the active profile in the title bar, Manage-button tooltip or Profiles editor when a preference appears to change. A project opened in another profile needs its own verification.

Profiles are organizational aids, not evidence that credentials or confidential files are securely isolated. Avoid copying tokens into a profile export or committing account-specific secrets to workspace settings.

If your organization uses GHE.com, follow the enterprise branch in the setup guide and use the instance address supplied by IT. GitHub.com account selection and a GHE.com authentication provider are different cases. Do not add a guessed github.authProvider setting or an arbitrary enterprise URL.

4. Repair a session only if selection is not enough

If the selected account has access but authentication still fails, save your work and use GitHub’s refresh procedure: sign that account out through Accounts, reload the window, and sign back in. Other extensions using the same session may need to reconnect.

Do not delete entries matching “vscode” or “github” from Credential Manager, Keychain or a Linux keyring. Such broad matching can affect unrelated tools. There is also no need to delete extension-storage directories or search for a supposed “Clear Auth Session” button.

If the wrong identity continues to appear, report the chosen account, workspace/profile, editor version and exact error to support. Redact secrets from diagnostics. The goal is an explicitly selected and verified account, not a completely emptied credential store.

Official documentation checked October 14, 2026.

ADVERTISEMENT