I need suggestions on how to use azure function app to run "az graph query" in Azure under a resource group and then store the output into storage or keyvault secrets.
Thanks in advance.
I need suggestions on how to use azure function app to run "az graph query" in Azure under a resource group and then store the output into storage or keyvault secrets.
Thanks in advance.
Executing a CLI command is not supported by Azure function as of now. You can have a look at supported languages
.Instead you can use Azure automation if you are looking to automate Azure operations, have you looked at Azure Automation
You cannot execute Azure CLI commands in Azure Functions but Azure functions support Powershell Core. So you can use Search-AzGraph
command to get the required data and store it in Storage account or Keyvault.
https://learn.microsoft.com/en-us/powershell/module/az.resourcegraph/search-azgraph?view=azps-3.4.0