Admin controls for GitHub Copilot
Visual Studio 2022 introduces new features that enable administrators to configure and manage GitHub Copilot more effectively within their enterprise. These features provide administrators greater control over the use of Copilot within their organization. Admins can disable Copilot for individual accounts, disable it entirely, and configure content exclusion to prevent certain files from being available to Copilot in Visual Studio.
In this article, you learn how to:
Disabling Copilot SKUs
With Visual Studio 2022 version 17.10 or later, project administrators can disable Copilot for individual accounts or disable it entirely using the Visual Studio Administrative Templates (ADMX/ADML). This helps ensure that your repository remains protected.
With Visual Studio 2022 version 17.13 or later, you can disable Copilot Free.
To configure and deploy these policies, you can use Microsoft Intune or the Local Group Policy Editor directly on the client machine.
Configure Copilot group policy
Visit the Microsoft Download Center to download the Visual Studio Group Policy Administrative Template files (ADMX/ADML). When prompted, ensure the files are saved to
C:\Windows\PolicyDefinitions
.Open the Windows Local Group Policy Editor and navigate to Computer Configuration > Administrative Templates > Visual Studio > Copilot Settings. Select a group policy.
Once you select the group policy, configure it to enable or disable Copilot as needed.
Restart your Visual Studio instance to apply the new policy changes.
Configure content exclusion
Content exclusion for GitHub Copilot enables administrators to prevent certain files from being available to Copilot and keep sensitive content secure from Copilot use. You can use content exclusions to configure GitHub Copilot to ignore specific files in a repository or organization.
Content exclusion is available only with a GitHub Copilot Business or a GitHub Copilot Enterprise subscriptions.
With Visual Studio 2022 version 17.11, GitHub Copilot for Visual Studio will ignore excluded content. When content is excluded, completions and chat aren't available for the affected files.
Note that Visual Studio 2022 version 17.11 respects rules only in the root repository where your solution lives, and doesn't apply rules from git submodules or for files not under a git repository.
GitHub Copilot Completions in Visual Studio and content exclusions
Code completions aren't available for excluded files.
Excluded content isn't included in code completion suggestions for other files.
GitHub Copilot Chat in Visual Studio and content exclusions
Excluded files can't be referenced in the chat window or in inline chat.
Chat window
Inline chat
Excluded content isn't included in GitHub Copilot Chat's responses.