Automate Azure Resource Graph Queries

Glauber Raphael 1 Reputation point
2022-03-29T20:13:28.197+00:00

Hi Guys,

I have two tenants with multiple resources. I need to get the public IP Addresses of all resources in both Tenants and export it to a csv/txt file.

I was using the Azure Resource Graph query to get the IP Addresses however, this action needs to be automated. I have tried using Logic Apps to automate it but there's no option for running the Resource Graph query.

Any ideas on how to accomplish this?

Thank you!

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,452 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,336 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
41,891 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,481 Reputation points
    2022-03-30T08:58:50.953+00:00

    @Glauber Raphael ,

    Thanks for reaching out to Q&A.

    If you have a query and running the query needs to be automated. You can run the query via powershell and there are multiple options available run the powershell script in Azure (Functions,runbook etc). This way you can automate the manual efforts of running the query.

    Azure resource graph provides support for other languages as well to run the query: https://learn.microsoft.com/en-us/azure/governance/resource-graph/first-query-dotnet

    1 person found this answer helpful.

  2. Charles Olaoye 1 Reputation point
    2022-06-15T14:20:59.583+00:00

    @Glauber Raphael , Did you find a solution to automatically extract data from two tenants?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.