Generating the Anonymous public read access to containers and blobs in Azure Storage?

289 views Asked by At

Using the Azure Resource Graph Explorer https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.Storage%2FStorageAccounts

I need to show an additional column:

URI or URL to access
Tags
Size

This query does not show those two additional columns I required:

resources
| where type =~ 'Microsoft.Storage/storageAccounts'
| extend allowBlobPublicAccess = parse_json(properties).allowBlobPublicAccess
| project subscriptionId, resourceGroup, name, allowBlobPublicAccess

This PowerShell is also not helping at all: Get-AzStorageAccount

1

There are 1 answers

1
Alexander Sloutsky On

It seems that Size is not appearing in the data that Azure Resource Explorer exposes.

For the rest columns - you can use following query to fetch it:

resources
| where type =~ 'Microsoft.Storage/storageAccounts'
| extend props = parse_json(properties)
| extend blobEndpoint = tostring(props.primaryEndpoints.blob), allowBlobPublicAccess=props.allowBlobPublicAccess
| project tags, subscriptionId, resourceGroup, name, blobEndpoint, allowBlobPublicAccess