question

GlauberRaphael-3075 avatar image
0 Votes"
GlauberRaphael-3075 asked CharlesOlaoye-1726 answered

Automate Azure Resource Graph Queries

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-logic-appsazure-monitorazure-scheduler
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MughundhanRaveendran-MSFT avatar image
1 Vote"
MughundhanRaveendran-MSFT answered GlauberRaphael-3075 commented

@GlauberRaphael-3075 ,

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://docs.microsoft.com/en-us/azure/governance/resource-graph/first-query-dotnet


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Following up to see if the above answer helps. Do let me know if you have any queries.

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

0 Votes 0 ·
GlauberRaphael-3075 avatar image GlauberRaphael-3075 MughundhanRaveendran-MSFT ·

Hi, and thank you for the reply!

I'm still checking the option you suggested me, to use PowerShell to automate the query.

0 Votes 0 ·
CharlesOlaoye-1726 avatar image
0 Votes"
CharlesOlaoye-1726 answered

@GlauberRaphael-3075 , Did you find a solution to automatically extract data from two tenants?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.