Edit

Share via


What is GitHub Copilot for Azure?

GitHub Copilot for Azure is a GitHub Copilot extension that enables developers to use natural language to:

  • Learn about Azure features.
  • Deploy Azure resources.
  • Get information about Azure resources.
  • Diagnose and troubleshoot problems with Azure resources.

You must have access to an Azure subscription and be subscribed to GitHub Copilot. Get started using the extension.

GitHub Copilot is designed to help developers, including developers new to Azure, to be more productive as quickly as possible. For experienced Azure users, GitHub Copilot for Azure replaces the need to:

  • memorize or look up Azure CLI commands and arguments.
  • create complex deployment scripts by hand.
  • sign in and browse through the Azure portal.

How it works

GitHub Copilot for Azure supplements the general knowledge of a foundational large language model (LLM) like GPT-5 and Claude Sonnet 4 with tool calling using the Azure Model Context Protocol (MCP) Server that enables interaction with Azure services, systems, and Azure Resource Graph to carry out specific tasks on your behalf. Over 35 Azure services are already available and more services and capabilities are being added regularly. Learn more about the capabilities of Azure MCP Server.

Supported development environments

You can use GitHub Copilot for Azure in the following supported development environments:

Supported Client Description Feature Stage Download Link
Visual Studio Code Surfaces GitHub Copilot for Azure via the GitHub Copilot user interface for both Ask and Agent modes. It also surfaces the Azure MCP Server tools. Provides IDE-specific tools and custom modes. General availability Link
Visual Studio 2022 Also Surfaces the GitHub Copilot for Azure via the GitHub Copilot user interface, and Azure MCP Server tools, but only provides access to Ask and Agent mode. Public preview Link
Visual Studio 2026 Surfaces built-in GitHub Copilot for Azure and Azure MCP Server tools via GitHub Copilot user interface. Available in both Ask and Agent mode. Public preview The tools are available upon installation of the Azure and AI development workload.

Primary scenarios

GitHub Copilot for Azure currently enables four primary scenarios:

Category Explanation Examples
Learn Learn about Azure services and tools from the latest Microsoft Learn documentation.
  • "What Azure services should I use with my app?"
  • "What are the available types of Azure OpenAI models?"
  • "What is Azure AI Search and why should I use it?"
  • "How does pricing work for Azure SQL?"
Design and develop Ask for guidance and help when building apps for the cloud.
  • "Can you help me build a RAG application with Python to deploy to Azure?"
  • "Use azd to undeploy my project in Azure."
  • "We're a pizza company and want to create an online customized pizza delivery solution. Create an API to accept pizza orders on Azure."
Deploy Create Azure resources and deploy apps.
  • "Can you help me deploy my application to Azure?"
  • "I need a CI/CD pipeline so I can get my app deployed to Azure."
  • "Use azd to undeploy my project from Azure."
Troubleshoot Diagnose and troubleshoot application and resource problems.
  • "What is using up my GPT-5 model quota on Azure?"
  • "Find out why my Kubernetes cluster is running slow on Azure."
  • "Why am I seeing 500 errors when opening my website on Azure?"
Optimize Answer questions about resources, including locations, settings, and resource health.
  • "How many Azure OpenAI deployments do I have?"
  • "Give me a count of Azure storage accounts in eastus by subscription, sorted from largest to smallest."

Note

Make sure the word "Azure" is somewhere in the prompt so that the LLM calls the appropriate tool from Azure MCP Server.

The documentation provides a quickstart and example prompts to help you start using GitHub Copilot for Azure as quickly as possible.

Best practices

Using copilots can increase developer productivity by answering questions, executing tasks, and generating code. However, remember these vital rules:

  • Review all AI-generated responses. Validate their correctness, applicability, potential outcomes (such as costs and security) before taking action based on those responses.
  • Never save application secrets or credentials in source code.
  • Never submit application secrets or credentials in questions or in code when you ask questions.

When you're working with any tool based on large language models use good prompt engineering techniques for the best results. The following tips come from the article Write effective prompts for Microsoft Copilot in Azure, which provides advice for prompt engineering in the context of Azure.

When working in agent mode, you can create longer prompts, however it's important to constrain the copilot before allowing it to act on your behalf especially when working with your Azure account. Here's an approach to building a longer prompt that might help get the results you desire.

  • Command - "Don't take any action until I authorize it." Prevent the copilot from taking action before you validate its understanding of the prompt.
  • Describe - Express what you want to happen. Here, you describe the work like you would to a coworker in sufficient detail for your coworker to be successful.
  • Ask - "Do you have any clarifying questions to ask me before you begin?" - Give the copilot an opportunity to identify unclear instructions.
  • Iterate - Iterate with the copilot until it understands what you are asking it to do. The copilot might require several iterations before it has everything it needs to be successful.
  • Request - "Create a step-by-step checklist plan that I can review before I authorize you to execute the plan." This not only forces the copilot to think ahead of its actions and explain its approach, it also follows these steps and provides a status.
  • Review - At some point, you might trust the copilot and not closely review its work. However, it's always best to make sure you review the plan and clarify what you want.
  • Authorize - "I reviewed the plan and you're authorized to begin."
  • Validate - Spend time checking the work to ensure that it accomplishes what you intended.

Tool calling

GitHub Copilot for Azure uses agentic tools behind the scenes to perform all operations. When first released for Visual Studio Code, the GitHub Copilot for Azure team created proprietary tools for use, however the current direction is to migrate away from proprietary tools to tools supplied by the Azure MCP Server.

Here's a list of all the tools currently supported by GitHub Copilot for Azure. Also listed is the migration status, which applies solely to the Visual Studio Code version. The Visual Studio 2022 version uses Azure MCP Server tools by default.

Tool Description and sample prompts Migration Status
azure_list_activity_logs Lists activity logs for a resource over a specified time.
  • "Show me the activity logs for my web app"
  • "What happened to my VM in the last 24 hours?"
Complete
azure_diagnose_resource Diagnoses app performance or failures using logs and telemetry.
  • "Why is my app slow?"
  • "Help me diagnose issues with my app"
Complete
azure_get_auth_context Retrieves current Azure authentication context (account, subscription, tenant).
  • "What Azure account am I signed in with?"
  • "Show me my current tenant"
N/A
azure_set_auth_context Updates Azure authentication context (sign in/out, switch tenant or subscription).
  • "Sign me into Azure"
  • "Change my subscription"
N/A
azure_get_azure_verified_module Fetches verified Bicep modules for a resource type.
  • "Get Bicep module for storage account"
  • "Find verified module for virtual machine"
Planned
azure_generate_azure_cli_command Generates Azure CLI commands based on user intent.
  • "Create a new resource group using Azure CLI"
  • "List all VMs in a resource group"
Complete
azure_recommend_custom_modes Captures Azure-related intent and suggests modes to enhance workflows.
  • "I want to build an Azure Function"
  • "Help me deploy to Azure"
N/A
azure_get_dotnet_template_tags Lists tags for filtering .NET templates "What .NET template tags are available?"
  • "Show me template categories for Azure projects"
  • N/A
    azure_dotnet_templates_for_tag Retrieves the list of .NET project templates matching a given tag for dotnet new commands.
    • "Show me Azure Function templates", "Get web API templates"
    N/A
    azure_query_azure_resource_graph Queries Azure Resource Graph for resources, subscriptions, or resource groups.
    • "List all my virtual machines"
    • "Show me resources in my resource group"
    Planned