Using GitHub CoPilot with Azure
This is my entry for this year’s Azure Back To School. Massive shout-out to Dwayne Natwick for organising this every year!
If you’re building on Azure, integrating GitHub Copilot into your workflow can save time, reduce friction, and help with infrastructure, deployment, and debugging, not just writing business logic.
Below is an explanation of how to use it, what works well, and what to be aware of.
What “Copilot + Azure” means today
Here’s how the two worlds overlap currently:
GitHub Copilot for Azure: a VS Code extension that lets you ask about Azure, manage resources, deploy, and diagnose, all from the Copilot chat interface.
Copilot + Azure DevOps / Azure Repos: You can use Copilot with Azure Repos for suggestions, commit messages, and PR descriptions.
Agentic DevOps vision: Copilot is evolving into autonomous “agents” that can perform multi-step tasks, such as refactoring, testing, and fixing bugs. Azure pipelines, boards, and resource operations may tie into that.
Inner sourcing/knowledge reuse via MCP server: You can integrate Azure DevOps/Azure MCP server with Copilot, allowing it to suggest content from your organisation’s own modules or documentation.
Azure Boards integration: you can assign work items from Azure Boards to a Copilot coding agent, and track progress.
So it’s not just “autocomplete in VS Code + Azure SDK”, Copilot is pushing into infrastructure, operations, and agentic automation.
How to get started (practical steps)
- Install Copilot and the Azure extension
- In VS Code, get the GitHub Copilot for Azure extension.
- You need a Copilot license (Pro, Business, etc.)
- Use @azure prompts in Copilot Chat
- Once the extension is active, you can prefix prompts with @azure to query Azure resource info, diagnose, or even do operations.
Examples:
@azure Deploy an Azure Function HTTP trigger with .NET 8
@azure What are the cost tiers for Azure SQL in West Europe?
@azure Diagnose why my webapp is showing 500 errors
- Deploy from within the editor
- Copilot for Azure can suggest CLI commands, resource templates, or deployment steps without you switching to the Azure Portal.
- Use Copilot in code + infra files
- When you edit ARM templates, Bicep, Terraform alongside app code, Copilot can help complete resource definitions, parameter scaffolding, and provide relevant snippets.
- Explore agentic features
- Try Copilot agents for multi-file changes, code refactors, or cloud migration tasks. (Feature availability depends on your subscription and preview access.)
- Enable MCP / context servers
- For tighter integration (e.g. your organization’s code modules, Azure DevOps context), you can configure MCP (Model Context Protocol) servers so Copilot has richer context
Benefits you’ll see
- Faster iteration: fewer trips to Azure portal or docs.
- Context-aware suggestions: Copilot knows your Azure setup or resource naming.
- Multi-step automation: not just code, but “deploy, test, monitor” flows.
- Consistency: reuse corporate standards or templates via inner sourcing.
- Better dev-ops synergy: bridging code and cloud operations in one interface.
Example scenario
Let’s say you’re building a serverless API on Azure Functions + Cosmos DB.
@azure Create an Azure Function project with HTTP trigger, .NET 8
Copilot responds with scaffold commands, project template.
@azure Provision a Cosmos DB instance with RU/s 400, region North Europe
Next up try
@azure Deploy this function and connect to Cosmos DB
It issues az commands or points you to CI/CD YAML.
If you see any errors after deployment:
@azure Diagnose 500 error in function logs
It helps inspect logs, points you to misconfigurations or missing settings.
Meanwhile, inside code files, Copilot suggests resource names, configuration keys, and helper snippets.
Future direction & what to watch
- More tasks handed over to the coding agent (not just suggestions).
- Better integration into Azure services (monitoring, cost, policies).
- Richer context via MCP so that Copilot is aware of your entire org’s patterns.
- Tighter link between Azure Boards / Pipelines and Copilot agents. (You already can assign work items to Copilot.
- Stronger guardrails: security analysis baked into generated infra code.
Summary
I use this GitHub Copilot on a daily basis and I recommend you at least take a look at it, if not use it daily too!














