Skip to content

Step 10: Get developers coding with Copilot

Who
Developers
Hands-on
≈ 10 min per person

Have ready

  • A Copilot license from step 9
  • Each developer’s Entra account
  • Your enterprise address https://SUBDOMAIN.ghe.com
Your setup, sketchedSketch: Microsoft Entra ID signs people in to your GHE.com enterprise (single sign-on) and syncs users and groups (SCIM). Your Azure subscription pays for usage. Developers sign in from their IDE or CLI and use Copilot.Entra IDGHE.comCopilotAzureIDESSOSCIMbillinglogin

The part of your setup this step touches

From the IDE to CopilotIDE / CLIVS Code · JetBrainsVisual Studio · XcodeEclipse · Copilot CLISUBDOMAIN.ghe.comnot github.com!Copilot licenseMicrosoft Entra IDSSO + MFAConditional Access1234
1. The IDE or CLI signs in to SUBDOMAIN.ghe.com, not github.com. 2. GHE.com sends the developer to Microsoft Entra ID. 3. Entra ID confirms who they are (SSO, MFA, Conditional Access). 4. Copilot lights up in the IDE.
  1. Open the settings (Ctrl+, or Cmd+,), search for enterprise and set Github-enterprise: Uri to https://SUBDOMAIN.ghe.com.

  2. Search for copilot. Under GitHub › Copilot: Advanced, click Edit in settings.json and make sure these lines are there:

    "github-enterprise.uri": "https://SUBDOMAIN.ghe.com",
    "github.copilot.advanced": {
    "authProvider": "github-enterprise"
    }
  3. Save. When VS Code asks you to sign in, click Sign in to GitHub and sign in with your Entra account. No prompt? Restart VS Code.

Copilot CLI:

Terminal window
copilot login --host SUBDOMAIN.ghe.com

GitHub CLI, for repositories in Path A:

Terminal window
gh auth login --hostname SUBDOMAIN.ghe.com

Also signed in to github.com? gh auth switch toggles between your accounts, and setting GH_HOST to SUBDOMAIN.ghe.com makes your enterprise the default.

Open Copilot Chat in the IDE and ask a question, or start typing in a code file and wait for a suggestion. If Copilot answers, you’re done.

The browser opens github.com to sign in

The enterprise address isn’t set, or the IDE hasn’t picked it up. Check the setting for your IDE above, sign out of GitHub in the IDE and sign in again.

Copilot says you don’t have access

Check that you’re in a team with a Copilot license (step 9) and signed in to SUBDOMAIN.ghe.com. Signing out and back in refreshes the license.

Sign-in works, but Copilot never answers

Your proxy or firewall probably blocks your enterprise addresses. Check the list from step 0 and step 5.

  • Developers sign in to SUBDOMAIN.ghe.com, not to github.com.
  • Copilot answers in their IDE or CLI.
All checkpoints on one printable page →