Answer: Create an SDK client for each authenticated user and pass their token as the GitHub token option, with useLoggedInUser set to false so it doesn't fall back to CLI login. For example, in TypeScript: new CopilotClient({ gitHubToken: userToken, useLoggedInUser: false }). Status: Confirmed Entry: tool/github-copilot/permissions-and-security/pass-token-to-sdk Revision: 2 Digest: sha256:f19da8c7e209b8a0 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:28:59Z Last changed: 2026-11-18T13:04:53Z (Example token: — → gho_user_access_token) Last verified: 2026-11-20T13:09:34Z Next check: 2026-11-21T13:09:34Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of TypeScript option | gitHubToken | [1] | 2026-11-20 Python option | github_token | [1] | 2026-11-20 Go option | GitHubToken | [1] | 2026-11-20 .NET option | GitHubToken | [1] | 2026-11-20 Java option | setGitHubToken | [1] | 2026-11-20 Example token | gho_user_access_token | [1] | 2026-11-20 Sources: [1] GitHub. "GitHub OAuth setup - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/setup/github-oauth Role: primary. Accessed: 2026-11-20T13:09:34Z Quote: "return new CopilotClient ({ gitHubToken : userToken, useLoggedInUser : false ," (Supports: TypeScript option) Quote: "return CopilotClient({ "github_token" : user_token, "use_logged_in_user" : False , })" (Supports: Python option) Quote: "GitHubToken: userToken, UseLoggedInUser: copilot.Bool( false )," (Supports: Go option) Quote: "GitHubToken = userToken, UseLoggedInUser = false ," (Supports: .NET option) Quote: ".setGitHubToken(userToken) .setUseLoggedInUser( false )" (Supports: Java option) Quote: "const client = createClientForUser ( "gho_user_access_token" );" (Supports: Example token) Snapshot SHA-256: 6cb86a4bd05345efe6558ac6a0fd816f714dc6051ecdac786f1774129d0909c7 (captured 2026-11-18T13:04:53Z) 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:04:53Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:09:34Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:09:34Z Last attempt: 2026-11-20T13:09:34Z Notes and limitations: Extracted automatically from a single official source (section "Step 3: pass the token to the SDK"). Related: https://latestn.com/tool/github-copilot/permissions-and-security/path-url-permissions How do I configure path and URL permissions in GitHub Copilot CLI? https://latestn.com/tool/github-copilot/permissions-and-security/permission-modes How do I set the default permission mode and disable bypass permissions mode for GitHub Copilot? https://latestn.com/tool/github-copilot/permissions-and-security/plugin-access-managed-settings What plugin access considerations apply when using enterprise-managed settings for GitHub Copilot Business? https://latestn.com/tool/github-copilot/permissions-and-security/mitigate-prompt-injection How can I mitigate prompt injection risks when using GitHub Copilot cloud agent? https://latestn.com/tool/github-copilot/permissions-and-security/network-access-permissions Who can manage GitHub Copilot network access for an organization? https://latestn.com/tool/github-copilot/permissions-and-security/org-vs-individual-space-sharing What is the difference between sharing organization-owned and individual-owned GitHub Copilot Spaces? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:04:53Z | changed | Example token: — → gho_user_access_token | [1] 2026-11-13T03:28:59Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/permissions-and-security/pass-token-to-sdk/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/pass-token-to-sdk POST: https://latestn.com/dispute/tool/github-copilot/permissions-and-security/pass-token-to-sdk with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/permissions-and-security/pass-token-to-sdk?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I pass a GitHub OAuth token to the GitHub Copilot SDK? Revision 2, last verified 2026-11-20T13:09:34Z. https://latestn.com/tool/github-copilot/permissions-and-security/pass-token-to-sdk (accessed 2026-11-21T09:57:52Z). @misc{LatestN_tool_github_copilot_permissions_and_security_pass_token_to_sdk_r2, title = {How do I pass a GitHub OAuth token to the GitHub Copilot SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/permissions-and-security/pass-token-to-sdk}}, note = {Revision 2; digest sha256:f19da8c7e209b8a0; last verified 2026-11-20T13:09:34Z; accessed 2026-11-21T09:57:52Z} } 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/pass-token-to-sdk