Answer: The SDK uses authentication methods in this priority order: Explicit gitHubToken, Direct API token, Environment variable tokens, Stored OAuth credentials, and GitHub CLI. Status: Confirmed Entry: tool/github-copilot/permissions-and-security/authentication-priority Revision: 3 Digest: sha256:bd862ad31ce3d9bd (changes whenever the content changes) Timeline: Created: 2026-11-15T13:13:48Z Last changed: 2026-11-18T13:02:46Z (Direct API token variables: — → GITHUB_COPILOT_API_TOKEN with COPILOT_API_URL) Last verified: 2026-11-20T13:07:46Z Next check: 2026-11-21T13:07:46Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Priority order | Explicit gitHubToken - Token passed directly to the SDK client or session configuration Direct API token - GITHUB_COPILOT_API_TOKEN with COPILOT_API_URL Environment variable tokens - COPILOT_GITHUB_TOKEN → GH_TOKEN → GITHUB_TOKEN Stored OAuth credentials - From previous copilot CLI login GitHub CLI - gh auth credentials | [1] | 2026-11-20 Environment variable token order | COPILOT_GITHUB_TOKEN → GH_TOKEN → GITHUB_TOKEN | [1] | 2026-11-20 Direct API token variables | GITHUB_COPILOT_API_TOKEN with COPILOT_API_URL | [1] | 2026-11-20 Sources: [1] GitHub. "Authentication - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/auth/authenticate Role: primary. Accessed: 2026-11-20T13:07:46Z Quote: "Explicit gitHubToken - Token passed directly to the SDK client or session configuration Direct API token - GITHUB_COPILOT_API_TOKEN with COPILOT_API_URL Environment variable tokens - COPILOT_GITHUB_TOKEN → GH_TOKEN → GITHUB_TOKEN Stored OAuth credentials - From previous copilot CLI login GitHub CLI - gh auth credentials" (Supports: Priority order) Quote: "Environment variable tokens - COPILOT_GITHUB_TOKEN → GH_TOKEN → GITHUB_TOKEN" (Supports: Environment variable token order) Quote: "Direct API token - GITHUB_COPILOT_API_TOKEN with COPILOT_API_URL" (Supports: Direct API token variables) Snapshot SHA-256: 67eb2efd291c73d68c2871f601f860d9792074c50326e7c6ba74d498baad0634 (captured 2026-11-18T13:02:45Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:02:46Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:07:46Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:07:46Z Last attempt: 2026-11-20T13:07:46Z Notes and limitations: Extracted automatically from a single official source (section "Authentication priority"). Related: https://latestn.com/tool/github-copilot/permissions-and-security/authorize-agent-app How do I authorize an agent app in GitHub Copilot? https://latestn.com/tool/github-copilot/permissions-and-security/automations-who-can-use Who can use automations in the GitHub Copilot app? https://latestn.com/tool/github-copilot/permissions-and-security/autopilot-permissions What permissions and autonomy settings does GitHub Copilot Autopilot use? https://latestn.com/tool/github-copilot/permissions-and-security/assisted-permissions-reduce-prompts How do I reduce permission prompts in GitHub Copilot CLI using assisted permissions? https://latestn.com/tool/github-copilot/permissions-and-security/authenticate-with-pat How do I authenticate GitHub Copilot CLI with a personal access token? https://latestn.com/tool/github-copilot/permissions-and-security/authentication-methods What authentication methods does the GitHub Copilot SDK support? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:02:46Z | changed | Direct API token variables: — → GITHUB_COPILOT_API_TOKEN with COPILOT_API_URL | [1] 2026-11-18T13:02:46Z | changed | Priority order: — → Explicit gitHubToken - Token passed directly to the SDK client or session configuration Direct API token - GITHUB_COPILOT_API_TOKEN with COPILOT_API_URL Environment variable tokens - COPILOT_GITHUB_TOKEN → GH_TOKEN → GITHUB_TOKEN Stored OAuth credentials - From previous copilot CLI login GitHub CLI - gh auth credentials | [1] 2026-11-18T13:02:46Z | changed | Direct API token variable: GITHUB_COPILOT_API_TOKEN → — | [1] 2026-11-18T13:02:46Z | changed | Authentication priority order: Explicit gitHubToken - Token passed directly to the SDK client or session configuration Direct API token - GITHUB_COPILOT_API_TOKEN with COPILOT_API_URL Environment variable tokens - COPILOT_GITHUB_TOKEN → GH_TOKEN → GITHUB_TOKEN Stored OAuth credentials - From previous copilot CLI login GitHub CLI - gh auth credentials → — | [1] 2026-11-16T12:51:37Z | changed | Direct API token variable: — → GITHUB_COPILOT_API_TOKEN | [1] 2026-11-16T12:51:37Z | changed | Authentication priority order: — → Explicit gitHubToken - Token passed directly to the SDK client or session configuration Direct API token - GITHUB_COPILOT_API_TOKEN with COPILOT_API_URL Environment variable tokens - COPILOT_GITHUB_TOKEN → GH_TOKEN → GITHUB_TOKEN Stored OAuth credentials - From previous copilot CLI login GitHub CLI - gh auth credentials | [1] 2026-11-16T12:51:37Z | changed | Priority order: Explicit gitHubToken - Token passed directly to the SDK client or session configuration Direct API token - GITHUB_COPILOT_API_TOKEN with COPILOT_API_URL Environment variable tokens - COPILOT_GITHUB_TOKEN → GH_TOKEN → GITHUB_TOKEN Stored OAuth credentials - From previous copilot CLI login GitHub CLI - gh auth credentials → — | [1] 2026-11-15T13:13:48Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/permissions-and-security/authentication-priority/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/permissions-and-security/authentication-priority POST: https://latestn.com/dispute/tool/github-copilot/permissions-and-security/authentication-priority with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/permissions-and-security/authentication-priority?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What is the authentication priority order in the GitHub Copilot SDK? Revision 3, last verified 2026-11-20T13:07:46Z. https://latestn.com/tool/github-copilot/permissions-and-security/authentication-priority (accessed 2026-11-21T09:53:19Z). @misc{LatestN_tool_github_copilot_permissions_and_security_authentication_priority_r3, title = {What is the authentication priority order in the GitHub Copilot SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/permissions-and-security/authentication-priority}}, note = {Revision 3; digest sha256:bd862ad31ce3d9bd; last verified 2026-11-20T13:07:46Z; accessed 2026-11-21T09:53:19Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/permissions-and-security/authentication-priority