In addition, a custom role with the following permission is needed for certain storage account checks.
{
"Name": "Azure Assessor",
"Description": "A role temporarily used to assess the security posture of an Azure tenant.",
"AssignableScopes": [
"/providers/Microsoft.Management/managementGroups/<tenant id>"
],
"Actions": [
"Microsoft.Storage/storageAccounts/listkeys/action"
],
"NotActions": [],
"DataActions": [],
"NotDataActions": []
}
Get list of all resources in the current subscription.
Get-AzResource | select Name,Type,ResourceGroupName,SubscriptionId | Export-Csv resources.csv