Get resource information using Microsoft Copilot for Azure (preview)

You can ask Microsoft Copilot for Azure (preview) questions about your Azure resources and cloud environment. Using the combined power of large language models (LLMs) and Azure Resource Graph, Microsoft Copilot for Azure (preview) helps you author Azure Resource Graph queries. You provide input using natural language from anywhere in the Azure portal, and Microsoft Copilot for Azure (preview) returns a working query that you can use with Azure Resource Graph. Azure Resource Graph also acts as an underpinning mechanism for other scenarios that require real-time access to your resource inventory.

Azure Resource Graph's query language is based on the Kusto Query Language (KQL) used by Azure Data Explorer. However, you don't need to be familiar with KQL in order to use Microsoft Copilot for Azure (preview) to retrieve information about your Azure resources and environment. Experienced query authors can also use Microsoft Copilot for Azure to help streamline their query generation process.

While a high level of accuracy is typical, we strongly advise you to review the generated queries to ensure they meet your expectations.

Note

The tasks and sample prompts listed here show a few of the areas where Microsoft Copilot for Azure (preview) can be especially helpful. However, this is not a complete list of all the things you can do. We encourage you to experiment with your own prompts and see how Microsoft Copilot for Azure (preview) can help you manage your Azure resources and environment.

Important

Microsoft Copilot for Azure (preview) requires registration and is currently available only to approved enterprise customers and partners. For more information, see Limited access to Microsoft Copilot for Azure (preview).

Sample prompts

Here are a few examples of the kinds of prompts you can use to generate Azure Resource Graph queries. Modify these prompts based on your real-life scenarios, or try additional prompts to create different kinds of queries.

  • "Show me all resources that are noncompliant"
  • "List all virtual machines lacking enabled replication resources"
  • "List all the updates applied to my Linux virtual machines"
  • "List all storage accounts that are accessible from the internet"
  • "List all virtual machines that are not running now"
  • "Write a query that finds all changes for last 7 days."
  • "Help me write an ARG query that looks up all virtual machines scale sets, sorted by creation date descending"
  • "What are the public IPs of my VMs?"
  • "Show me all my storage accounts in East US?"
  • "List all my Resource Groups and its subscription."
  • "Write a query that finds all resources that were created yesterday."

Examples

You can Ask Microsoft Copilot for Azure (preview) to write queries with prompts like "Write a query to list my virtual machines with their public interface and public IP."

Screenshot of Microsoft Copilot for Azure responding to a request to list VMs.

If the generated query isn't exactly what you want, you can ask Microsoft Copilot for Azure (preview) to make changes. In this example, the first prompt is "Write a KQL query to list my VMs by OS." After the query is shown, the additional prompt "Sorted alphabetically" results in a revised query that lists the OS alphabetically by name.

Screenshot of Microsoft Copilot for Azure (preview) generating and then revising a query to list VMs by OS.

You can view the generated query in Azure Resource Graph Explorer by selecting Run. For example, you can ask "What resources were created in the last 24 hours?" After Microsoft Copilot for Azure (preview) generates the query, select Run to see the query and results in Azure Resource Graph Explorer.

Screenshot showing Microsoft Copilot for Azure generating a query and showing results in Azure Resource Graph Explorer.

Next steps