microsoft / microsoft/vscode

Support GitHub Copilot authentication in Azure DevOps pipelines for automated VS Code chat participant testing

Open
#332,983 0 comments 0 reactions 1 assignee Claimed by @TylerLeonhardt View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Scenario

We want to run automated end-to-end tests for a VS Code chat participant from an Azure DevOps (ADO) CI pipeline.

The chat participant uses the VS Code Language Model API (`vscode.lm`) and requires GitHub Copilot authentication and service access. The pipeline must launch VS Code, invoke the chat participant, and validate its behavior without interactive user input.

## Problem

GitHub Copilot authentication is normally associated with an interactive, licensed GitHub user. An ADO service connection, workload identity, or service principal does not appear to provide GitHub Copilot entitlement.

We want to avoid unsupported approaches such as:

- Using a developer's personal credentials
- Exporting or copying VS Code credential storage
- Automating OAuth or device-login prompts
- Injecting undocumented access tokens

## Questions

1. What is the supported way to authenticate GitHub Copilot from an ADO CI pipeline?
2. Can an ADO workload identity, service principal, GitHub App, or other machine identity receive Copilot access?
3. Is a dedicated GitHub automation account with a Copilot Business/Enterprise seat supported for automated testing?
4. Can a persistent self-hosted ADO agent authenticate once and securely reuse its VS Code/Copilot session?
5. Is there a supported credential provider, environment variable, or CI test identity for GitHub Copilot?
6. What is the recommended approach for automated E2E testing of VS Code chat participants that depend on `vscode.lm`?

## Intended environment

- Azure DevOps CI pipeline
- Windows agent, self-hosted if required
- VS Code launched through UI automation
- A VS Code extension contributing a chat participant
- GitHub Copilot as the language-model provider
- No interactive authentication during pipeline execution

We are looking for an officially supported and secure solution for granting the pipeline GitHub Copilot authentication and access.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.