Unlocking the Power of Copilot for Azure
In the latest updates announced at Microsoft Build (video below, I’ve been using Copilot for Azure (preview) more frequently. This AI-powered tool is designed to assist anyone on the Azure portal with tasks such as managing resources, gaining cost insights, monitoring, and accessing documentation. By leveraging Large Language Models (LLMs), Copilot enhances productivity and simplifies your Azure experience.
Copilot in Azure acts as a personal assistant, answering questions and offering information tailored to your specific Azure environment and resources. Currently, in preview, it’s available at no cost and operates under the permissions of the logged-in user account.
In this blog post, I’ll share some of my most useful prompts for Microsoft Copilot in Azure and the techniques I’ve discovered along the way.
- Copilot for Azure Demo – Microsoft Build 2024
- How to enable Copilot for Azure?
- Mastering Resource Insights with KQL Prompts in Azure
- Creating and Enforcing Policies with Azure Policy Prompts
- Optimizing Automation with Azure PowerShell Prompts
- Streamlining Azure Deployments Prompts
- Enhancing Security with Azure RBAC Prompts
- Getting Accurate Metrics with Azure Copilot Data Prompts
- Cutting Costs with Azure Cost Analysis Prompts
- Effective Techniques for Crafting Azure Copilot Prompts
- Future Enhancements for Azure Copilot: What I’d Love to See
Copilot for Azure Demo – Microsoft Build 2024
- Website: https://azure.microsoft.com/en-gb/products/copilot
- Docs: https://learn.microsoft.com/en-gb/azure/copilot
How to enable Copilot for Azure?
By default, Copilot (preview) in Azure is available to all users in a tenant. However, Global Administrators can choose to control access to Microsoft Copilot in Azure for their organization.

Mastering Resource Insights with KQL Prompts in Azure
Understanding your resources in Azure is crucial for efficient management. One powerful tool for this is the Azure Resource Graph Explorer, which uses Kusto Query Language (KQL). Here are some of the KQL prompts I’ve found most useful in my journey:
- “List all storage accounts with SKU LRS”
- “Write a query that finds all changes Thursday between 6 pm and 9 pm.“
- “List all publicly accessible blob storage containers.”
Creating and Enforcing Policies with Azure Policy Prompts
Managing Azure policies can be a lot of work, but Copilot for Azure can make it easier. It can help you create new policies or reuse existing ones by explaining the process clearly.
Sometimes, Copilot will guide you through creating a policy step-by-step. If you prefer not to receive instructions, you can use the prompt: “Provide the JSON file, don’t provide me instructions.” This way, Copilot will give you the direct JSON file instead. Here are a few prompts I’ve found useful:
- “Write me an Azure policy to enforce LRS SKU for storage accounts.”
- “Write me an Azure policy to ensure soft delete for a storage account is at least 30 days.”
- “Create an Azure Policy definition to enforce that all deployed resources are tagged with ‘Environment’ and ‘Owner’ tags.”
Optimizing Automation with Azure PowerShell Prompts
When you need the right PowerShell command, Azure Copilot has you covered. Here are a few prompts I’ve found useful:
- “How do I list all storage accounts with LRS in PowerShell?”
- “How do I assign the resource tag “environment” to “PRD” if the resource name contains “PRD” using PowerShell?”
- “How do I scale an Azure App Service Plan using PowerShell?”
Streamlining Azure Deployments Prompts
Using Azure Copilot for deployments works exceptionally well. I believe this is because Copilot has a deep understanding of resource management, making tasks like releasing and deploying resources very accurate. I was also pleasantly surprised to see that Copilot understands ARM, Bicep, and Terraform.
Here are a few prompt questions I used:
- “Show me a Bicep configuration for a key vault with soft delete enabled.”
- “Show me a Bicep configuration for a .NET 8 webapp with always on enabled, enforce HTTPS, and FTP disabled.”
Enhancing Security with Azure RBAC Prompts
When it comes to enhancing security, Azure RBAC (Role-Based Access Control) is essential. If you’re looking for specific RBAC settings or roles, Azure Copilot can provide the answers you need. Here are some prompts I’ve used to improve security:
- “What RBAC role can I assign to someone to view a key vault’s secret values?”
- “What RBAC role can I assign to someone to view the environment variables of a web app?”
Getting Accurate Metrics with Azure Copilot Data Prompts
Need to gather monitoring information and metrics from your Azure environment? Azure Copilot has you covered. Here are a few queries I’ve used:
- “Are there any alerts for my resources?”
- “Run anomaly detection for 10/06/2024, 8 PM.”
- “Show me the memory usage trend for applications X and Y over the last 4 hours.”
Cutting Costs with Azure Cost Analysis Prompts
Managing your budget on Azure? Copilot can help you analyze your spending efficiently. Here are a few prompts I’ve found useful:
- “Summarize my costs for the last 7 days, group results by resource tag “environment””
- “Why did my cost spike on June 6th?”
- “Show me the resource group with the highest spending in the last 3 months.”
Effective Techniques for Crafting Azure Copilot Prompts
Provide Contextual Clarity
- Technique: Give detailed context for the task.
- Example: “Generate an ARM template to deploy a Linux virtual machine. The VM should be in the ‘West US’ region, with a size of ‘Standard_D2s_v3’, and use an existing resource group named ‘MyResourceGroup’.”
Step-by-Step Instructions
- Technique: Break down complex tasks into clear, sequential steps.
- Example: “Write a Python script to perform the following:
1. Connect to Azure Storage Account.
2. List all blobs in a specific container.
3. Download a blob to a local directory.”
Specify Output Format
- Technique: Clearly define what the output should look like.
- Example: “Create a JSON configuration file for an Azure Logic App that triggers on an HTTP request and sends an email using Office 365.”
Detailed Descriptions
- Technique: Describe the desired behaviour or outcome thoroughly.
- Example: “Write a Bicep template to create an Azure App Service with the following requirements:
– Runtime: .NET 8
– Pricing tier: S1
– Include Application Insights integration.”
Use a New Chat to Set the Context
- Technique: Start a new chat to reset Azure Copilot’s context.
- Example: When beginning a new task, start a new conversation to ensure Azure Copilot understands the fresh context.
Future Enhancements for Azure Copilot: What I’d Love to See
- More Accurate Results and Faster Responses Sometimes, Copilot displays the message “This is taking longer than expected,” which often leads to incorrect results. Basic queries, like KQL queries, frequently return wrong answers, requiring manual correction.
- Update Capabilities Within Chat It would be helpful to update resources or perform bulk updates directly from the chat screen. Currently, when asking “update xyz,” Copilot often doesn’t understand the request correctly. A workaround is to ask: “Write me an ARM deployment to do xyz.”
- Better Understanding of Context Copilot struggles with functional context, such as understanding environments based on subscription names, tags, or resource names. This means users have to explain everything in detail.
- Providing Documentation (currently very limited) It would be useful if Copilot could provide documentation for overall application workflows or cross-resource setups. Features like analyzing Logic App workflows or workbooks and explaining them would be highly beneficial.
- Integration with Third-Party Plugins Azure Marketplace allows third parties to offer services on your Azure hosting. Opening up Copilot to third-party marketplace applications would enable it to provide more comprehensive information and capabilities.
