Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Get started with GitHub Copilot for Azure to streamline your development workflow and enhance your productivity on the Azure platform. This guide walks you through the prerequisites and installation of the GitHub Copilot for Azure in Visual Studio, so you can write your first prompt.
Prerequisites
To complete the steps in this article, make sure that you have:
An Azure account and access to an Azure subscription. For details on how to set them up, see the pricing page for Azure accounts.
A GitHub account and a GitHub Copilot subscription. For details on how to set them up, see Creating an account on GitHub and Quickstart for GitHub Copilot, respectively.
Visual Studio Code. For details on how to download and install it, see Setting up Visual Studio Code.
The GitHub Copilot extension and the GitHub Copilot Chat extension. For instructions on how to install these extensions, see Set up GitHub Copilot in VS Code and Getting started with GitHub Copilot Chat in VS Code, respectively.
Important
GitHub Copilot is a separate subscription managed by GitHub. For questions regarding GitHub Copilot subscriptions and Support, see Getting started with a GitHub Copilot plan.
By default, Copilot in Azure is available to all users in a tenant. However, Global Administrators can manage access to Copilot in Azure for their organization. Access can also be optionally granted to specific Microsoft Entra users or groups. For more information, see Manage access to Microsoft Copilot in Azure.
Install GitHub Copilot for Azure
- In Visual Studio Code, select the Extensions icon.
- In the Extensions Marketplace, search for GitHub Copilot for Azure. When the GitHub Copilot for Azure extension appears, select Install.
- If you're prompted, sign in to your Azure account.
Write your first prompt
Ensure that the extension is installed, that you're properly authenticated, and that the extension is working correctly.
If the Chat window isn't already open, make sure it's open by either selecting the Toggle Chat button in the menu bar, or select the dropdown next to the Toggle Chat button and select Open Chat (Ctrl+Alt+I).
In the chat text area at the bottom of the chat pane, enter the following prompt:
Do I have any Azure resources currently running?The answer to your question depends on what's currently running in Azure in your subscription.
Next, use the following prompt:
What are your tools?The completion response displays a list of GitHub Copilot for Azure specific tools available to GitHub Copilot. The response provides a good overview of the kinds of functionality now available to you:
I'll ask the Azure development helper to recommend custom modes relevant to listing and explaining the GitHub Copilot for Azure tools in VS Code; expected outcome: a short set of recommended modes or tips to tailor the tools explanation. Progress update: I queried the Azure development helper to get recommended custom modes for this topic. Next, I'll list and briefly explain the tools I have available (grouped and with example prompts and common uses) so you can copy/paste or use them directly in VS Code. Tools I can use (concise overview) 1. Search & navigation - Capabilities: semantic code/documentation search, file search with globs, text search (grep), list directory contents, read file contents, find usages/references. - Example prompts: - "Find all usages of MyService in this workspace." - "Search for connectionString in **/*.config files." - When to use: locating code, docs, or examples quickly inside your repo. 2. Code editing & analysis - Capabilities: insert edits into files, create or modify files, suggest refactors, report code errors, find test files. - Example prompts: - "Add a function to validate input in src/utils.js." - "Refactor this function to use async/await and update its tests." - When to use: implementing features, fixing bugs, generating or updating code. 3. Terminal & Git operations - Capabilities: run shell commands, read terminal output, show git diffs and changed files. - Example prompts: - "Run npm test and show me failing tests." - "Stage and commit the changes with message 'fix: update README'." - When to use: run builds/tests, inspect outputs, perform git workflows (if enabled). 4. Project creation & workspace setup - Capabilities: create new workspaces, scaffold projects (templates), install VS Code extensions, create notebooks. - Example prompts: - "Generate a Node.js express app scaffold in a new folder." - "Add recommended extensions for Python development." - When to use: bootstrapping projects or adding project-level config. 5. Web & API tools - Capabilities: fetch web pages, retrieve API docs (for example VS Code API references), gather remote content for research. - Example prompts: - "Fetch the Azure CLI docs for az storage account list." - "Get the VS Code extension API docs for commands." - When to use: look up official docs or examples during work. 6. Azure-specific tools - Capabilities: Azure development best practices guidance, Microsoft Learn documentation lookup, query Azure Resource Graph (when authenticated), manage Azure auth context (change tenant, sign out), generate Azure CLI / Bicep / ARM snippets, Bicep schemas, and guidance for deploying models and services. - Example prompts: - "What are Azure best practices for deploying this function app?" - "@azure /changeTenant β set my default tenant to <tenant-id>" - "Generate a Bicep template for an App Service and a Storage Account." - When to use: any task that touches Azure resources, deployment, or configuration. 7. Documentation & learning - Capabilities: search and extract Microsoft Learn articles, provide code samples from official docs, show relevant how-to steps. - Example prompts: - "Show official docs for configuring Key Vault access policies." - "Give me a short tutorial on using Azure App Configuration." - When to use: learn or reference official Microsoft guidance. How I present results - Short answers or step-by-step instructions. - Full edits (I can create or modify files if you allow the extension to act). - Commands and code snippets you can paste into your terminal. - Checks (like running tests or linters) when terminal access is allowed. Example: Quick copy-paste prompts you can use in the VS Code chat - "What are your tools?" β lists the tools (this reply). - "Find all TODO comments in this repo and open a summary." - "Generate an az CLI command to list storage accounts sorted by region." - "@azure /changeTenant" β opens tenant selection (if you need to set a default). Notes and privacy/permissions - Some capabilities (like querying your Azure resources or running commands) require you to be signed in and to enable those tools in the extension (you can enable/disable specific tools in the chat pane tool list). - I won't perform actions that need elevated permissions without verifying your explicit consent. If you'd like, I can: - Expand any tool section with more example prompts and exact commands. - Show a short step-by-step for enabling/disabling tools in the chat pane. - Generate a one-page cheatsheet you can paste into an internal docs file. Which would you like next?The contents of the reply may vary and can change over time as new capabilities and tools are added.
To test out prompts about Azure-specific tooling, try the following prompt:
What is the az command to list all my storage accounts ordered by location?The completion to that prompt might generate:
I'll show the exact az CLI commands (sorted ascending/descending) plus a few useful output variants and a quick note about prerequisites. Commands - Sorted by location (ascending), full JSON: az storage account list --query "sort_by(@, &location)" -o json - Sorted by location, show only name and location in a readable table: az storage account list --query "sort_by(@, &location)[].[name,location]" -o table - Sorted by location (descending): az storage account list --query "reverse(sort_by(@, &location))" -o json - Sorted by location and include resource group and SKU in table: az storage account list --query "sort_by(@, &location)[].[name,resourceGroup,sku.name,location]" -o table Notes - Run az login first and ensure the correct subscription is selected (e.g., az account set -s "<subscription-id-or-name>"). - You need permission to list storage accounts in the chosen subscription. - The query uses JMESPath (sort_by/reverse) to order results client-side. Would you like a version that groups counts by region or that queries across all subscriptions?
Enable and disable tools in agent mode
You might want to disable or re-enable certain tools available by GitHub Copilot for Azure.
Select the tool icon in the chat pane.
Use the checkbox next to the list of tools to enable / disable tools (or groups of tools).
Set your default tenant
If you have multiple Microsoft Entra ID tenants, You can set a default tenant using the following prompt:
@azure /changeTenant
Select from a list of your available tenants in the top center drop-down.
You can also set the default tenant in the extension settings:
In Visual Studio Code, on the Activity Bar, select Extensions. Then scroll down to GitHub Copilot for Azure.
Select the gear icon in the corner of the extension's entry, and then select Settings from the pop-up menu.
On the Settings tab, set the Azure Resource Graph tenant to your Microsoft Entra tenant ID. You can find your Microsoft Entra tenant ID in the Azure portal.
View the GitHub Copilot for Azure instructions file
The instructions file (also referred to as "Azure Copilot Guidelines") contains high-level guidance for GitHub Copilot that is added to the context window when sending prompts to GitHub Copilot for Azure tools and Azure MCP Server tools. The guidance in this file is intended to be global in nature, meaning, it's intended for all interactions across GitHub Copilot for Azure across all projects. This file is located in a hidden folder location and is not intended to be modified. You should not modify this file because it could degrade or disable GitHub Copilot for Azure, and your changes might be overwritten with new updates to GitHub Copilot for Azure.
Viewing the "Azure Copilot Guidelines" can provide an insight into how the GitHub Copilot for Azure tools and the Azure MCP Server tools are introduced to GitHub Copilot helping you develop a deeper understanding of how it all works.
Important
You should not modify this file.
Select
ctrl+shift+pto open the command palette.Type
Chat: Configure Instructionsand select the entry.
In the next step, select
AzureCopilotGuidelines.
A new tab opens containing the instructions file.
Important
You should not modify this file.
Prerequisites
An Azure account and access to an Azure subscription. For details on how to set them up, see the pricing page for Azure accounts.
A GitHub account and a GitHub Copilot subscription. For details on how to set them up, see Creating an account on GitHub and Quickstart for GitHub Copilot, respectively.
Visual Studio 2022 (Any edition). For details on how to download and install it, see Install Visual Studio.
Important
GitHub Copilot is a separate subscription managed by GitHub. For questions regarding GitHub Copilot subscriptions and Support, see Getting started with a GitHub Copilot plan.
Install GitHub Copilot for Azure
- In Visual Studio 2022, in the Extensions menu, select Manage Extensions.
- In the Extension Manager search for and select GitHub Copilot for Azure (VS 2022). Select the Install button.
- After a moment, you'll see a banner: "Your changes are scheduled. The modifications will begin when Microsoft Visual Studio is closed." Shut down Visual Studio.
- The VSIX Installer dialog opens confirming the installation. Select the Modify button.
- After a few moments, you should see "Modifications Complete". Select the Close button.
- Reopen Visual Studio 2022.
- Select the "GitHub Copilot" button in upper-right of window on the toolbar. Select Open Chat Window.
- When the GitHub Copilot Chat window appears, in the chat area at the bottom, select Agent mode, then select the Select tools button (two wrenches).
- In the Select tools dialog, you should see "Azure MCP Server". To the right, you see "0/153" if no tools are selected (which is currently the default). Select the parent node to choose all of the tools.
Important
If you do not see "Azure MCP Server" in the list of tools, you may need to uninstall and re-install the extension.
Write your first prompt
If the Chat window isn't already open, make sure it's open by selecting the View > GitHub Copilot Chat menu option. You should see chat window docked to the right side by default.
In the chat text area at the bottom of the chat pane, enter the following prompt:
Do I have any resources currently running?
By default, GitHub Copilot uses ask mode. Ask mode provides answers to your prompts in the chat pane. Agent mode enables GitHub Copilot to take action in your workspace.
The answer to your question depends on what's currently running in Azure in your subscription.
Agent mode
In Agent mode, GitHub Copilot can perform tasks across your entire Visual Studio workspace, making edits, executing terminal commands, and so on.
GitHub Copilot for Azure provides "tools" to GitHub Copilot to enhance the agentic experience through deep integration with Azure.
To switch, between ask and agent mode, select the down chevron next to the Ask option in the chat area and select the desired mode.
Enable and disable tools in agent mode
You might want to disable or re-enable certain tools available by GitHub Copilot for Azure.
Select the "Select tools" icon in the chat pane.
Use the checkbox next to the list of tools to enable / disable tools (or groups of tools).
Prerequisites
An Azure account and access to an Azure subscription. For details on how to set them up, see the pricing page for Azure accounts.
A GitHub account and a GitHub Copilot subscription. For details on how to set them up, see Creating an account on GitHub and Quickstart for GitHub Copilot, respectively.
Visual Studio 2026 (Any edition). For details on how to download and install it, see Install Visual Studio.
Important
GitHub Copilot is a separate subscription managed by GitHub. For questions regarding GitHub Copilot subscriptions and Support, see Getting started with a GitHub Copilot plan.
Install GitHub Copilot for Azure
If you already installed Visual Studio 2026 and want to add GitHub Copilot for Azure after initial install, open Visual Studio Installer and select the Modify button, which displays the available workloads.
If you're installing Visual Studio 2026 for the first time, the Visual Studio Installer automatically displays the available workloads.
β―On the Workloads tab, make sure "Azure AI development" is selected.
Select the Install button to complete the installation.
Launch Visual Studio 2026 and create or load a project.
Open GitHub Copilot Chat.
If prompted, sign in to your GitHub account.
If prompted, sign in to your Azure account.
In the chat area, select the Select tools button (two wrenches icon) to display a list of available tools. Enable all Azure tools by checking the top nodes for Azure.
Also select the top node for Azure MCP Server.
Write your first prompt
If the Chat window isn't already open, make sure it's open by selecting the View > GitHub Copilot Chat menu option. You should see chat window docked to the right side by default.
In the chat text area at the bottom of the chat pane, enter the following prompt:
Do I have any resources currently running?
By default, GitHub Copilot uses ask mode. Ask mode provides answers to your prompts in the chat pane. Agent mode enables GitHub Copilot to take action in your workspace.
The answer to your question depends on what's currently running in Azure in your subscription.
Agent mode
In Agent mode, GitHub Copilot can perform tasks across your entire Visual Studio workspace, making edits, executing terminal commands, and so on.
GitHub Copilot for Azure provides "tools" to GitHub Copilot to enhance the agentic experience through deep integration with Azure.
To switch, between ask and agent mode, select the down chevron next to the Ask option in the chat area and select the desired mode.
Enable and disable tools in agent mode
You might want to disable or re-enable certain tools available by GitHub Copilot for Azure.
Select the "Select tools" icon in the chat pane.
Use the checkbox next to the list of tools to enable / disable tools (or groups of tools).
Related content
- Understand what GitHub Copilot for Azure is and how it works.
- Follow the quickstart to understand how to include GitHub Copilot for Azure in your software development workflow. The quickstart describes how to deploy services to Azure, monitor their status, and troubleshoot problems.
- See example prompts for learning more about Azure and understanding your Azure account, subscription, and resources.
- See example prompts for designing and developing applications for Azure.
- See example prompts for deploying your application to Azure.
- See example prompts for troubleshooting your Azure resources.