Answer: You need to set AZURE_TOKEN_CREDENTIALS to Managed Identity Credential when running in Azure, and optionally AZURE_CLIENT_ID to the client ID of a User-assigned Managed Identity. You also need to set FOUNDRY_RESOURCE_URL to your Microsoft Foundry resource URL; no API key environment variable is needed. Status: Confirmed Entry: tool/github-copilot/settings/azure-managed-identity-env-config Revision: 3 Digest: sha256:dd37f52c48d15abb (changes whenever the content changes) Timeline: Created: 2026-11-13T03:28:51Z Last changed: 2026-11-19T13:03:00Z (API key: — → No API key environment variable is needed) Last verified: 2026-11-20T13:09:24Z Next check: 2026-11-21T13:09:24Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of AZURE_TOKEN_CREDENTIALS | Managed Identity Credential | [1] | 2026-11-20 AZURE_CLIENT_ID | 11111111-2222-3333-4444-555555555555 | [1] | 2026-11-20 FOUNDRY_RESOURCE_URL | https:/ / .openai.azure.com | [1] | 2026-11-20 API key | No API key environment variable is needed | [1] | 2026-11-20 Sources: [1] GitHub. "Azure Managed Identity with BYOK - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/setup/azure-managed-identity Role: primary. Accessed: 2026-11-20T13:09:24Z Quote: "When running in Azure , set it to Managed Identity Credential ." (Supports: AZURE_TOKEN_CREDENTIALS) Quote: "set this to the client ID of a User-assigned Managed Identity when using Managed Identity Credential . If not set, Azure uses the System-assigned Managed Identity. 11111111-2222-3333-4444-555555555555" (Supports: AZURE_CLIENT_ID) Quote: "Your Microsoft Foundry resource URL https:/ / .openai.azure.com" (Supports: FOUNDRY_RESOURCE_URL) Quote: "No API key environment variable is needed—authentication is handled by Azure Identity credentials." (Supports: API key) Snapshot SHA-256: 2d7fc2287c224e3de1aa1db66a0fa57ee6c2c8df45d39b21637b15657287248e (captured 2026-11-18T13:04:41Z) 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:41Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:09:24Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:09:24Z Last attempt: 2026-11-20T13:09:24Z Notes and limitations: Extracted automatically from a single official source (section "Environment configuration"). Related: https://latestn.com/tool/github-copilot/settings/byok-user-setup How do I configure BYOK for GitHub Copilot as an individual user? https://latestn.com/tool/github-copilot/settings/change-config-directory-location How do I change the location of the GitHub Copilot CLI configuration directory? https://latestn.com/tool/github-copilot/settings/change-mcp-registry-in-ide How do I change the MCP registry used by GitHub Copilot in my IDE? https://latestn.com/tool/github-copilot/settings/add-personal-custom-instructions How do I add personal custom instructions for GitHub Copilot Chat? https://latestn.com/tool/github-copilot/settings/allow-actions-on-copilot-push How do I allow GitHub Actions workflows to run automatically when GitHub Copilot pushes? https://latestn.com/tool/github-copilot/settings/apply-custom-instructions-scopes How do I apply GitHub Copilot custom instructions across different scopes or IDEs? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:03:00Z | changed | API key: — → No API key environment variable is needed | [1] 2026-11-19T13:03:00Z | changed | API key environment variable: No API key environment variable is needed → — | [1] 2026-11-17T13:27:40Z | changed | API key environment variable: — → No API key environment variable is needed | [1] 2026-11-17T13:27:40Z | changed | API key: No API key environment variable is needed → — | [1] 2026-11-13T03:28:51Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/settings/azure-managed-identity-env-config/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/settings/azure-managed-identity-env-config POST: https://latestn.com/dispute/tool/github-copilot/settings/azure-managed-identity-env-config with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/settings/azure-managed-identity-env-config?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What environment variables do I need to set for Azure Managed Identity with BYOK in the GitHub Copilot SDK? Revision 3, last verified 2026-11-20T13:09:24Z. https://latestn.com/tool/github-copilot/settings/azure-managed-identity-env-config (accessed 2026-11-21T10:00:15Z). @misc{LatestN_tool_github_copilot_settings_azure_managed_identity_env_config_r3, title = {What environment variables do I need to set for Azure Managed Identity with BYOK in the GitHub Copilot SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/settings/azure-managed-identity-env-config}}, note = {Revision 3; digest sha256:dd37f52c48d15abb; last verified 2026-11-20T13:09:24Z; accessed 2026-11-21T10:00:15Z} } 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/settings/azure-managed-identity-env-config