AzureStorage.Blobs

Accessing Data

Returns a navigation table of containers and blobs from an Azure Blob Storage account.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

AzureStorage.Blobs(account as text, optional options as nullable record) as table

Parameters

NameTypeRequiredDescription
accounttextYesThe Azure Blob Storage account name (e.g., "mystorageaccount") or the full account URL (e.g., "https://mystorageaccount.blob.core.windows.net").
optionsrecordNoAn optional record with additional connection options.

Return Value

tableA navigation table of containers in the Azure Blob Storage account. Drilling into a container reveals its blobs with Name, Folder Path, Date accessed, Date modified, Date created, Extension, Attributes, and Content columns.

Remarks

AzureStorage.Blobs connects to an Azure Blob Storage account and returns a navigation table where each row represents a storage container. Drilling into a container's Data column returns a flat table of every blob in that container, with one row per blob and a Content column containing the binary data of the file.

Navigation table structure: The container-level table contains Name and Data columns. The blob-level table (inside each container) contains: - Name (text) — the blob name, including any virtual folder prefix (e.g., 2024/sales/q1.csv). - Folder Path (text) — the virtual folder path derived from the blob name. - Date accessed, Date modified, Date created (datetime) — blob timestamps. - Extension (text) — the file extension including the leading dot. - Attributes (record) — blob metadata attributes. - Content (binary) — the binary content of the blob.

Authentication: Supports Account Key (storage account name + access key), Shared Access Signature (SAS), and anonymous access for publicly accessible containers. Azure Active Directory (Entra ID / OAuth) is supported in recent Power BI Desktop versions. Configure credentials in the Power Query data source settings dialog using the account URL as the credential scope.

Account parameter formats: Pass either the storage account name alone (e.g., "mystorageaccount") and Power Query constructs https://mystorageaccount.blob.core.windows.net, or pass the full service endpoint URL directly. Both forms are equivalent.

Blob content parsing: The Content column is lazy — blobs are not downloaded until Content is accessed. Filter to the container and blob names you need before expanding Content. Pass the binary to the appropriate parsing function: - Csv.Document([Content]) for CSV/TSV files. - Excel.Workbook([Content]) for .xlsx / .xlsb files. - Json.Document([Content]) for JSON files. - Xml.Document([Content]) for XML files. - Pdf.Tables([Content]) for PDF files.

Query folding: Not supported. Blob enumeration and all filtering occur in Power Query after the blob list is fetched from the Blob Storage API.

Power BI Service: Direct cloud refresh is supported when using Account Key or SAS authentication and the storage account is publicly reachable. For storage accounts behind a private endpoint or firewall, use a VNet data gateway or a managed identity configured on the Power BI workspace.

Examples

Example 1: Connect to an Azure Blob Storage account by name

```powerquery

AzureStorage.Blobs("mystorageaccount")

Example 2: Connect using the full blob service endpoint URL

```powerquery

AzureStorage.Blobs("https://mystorageaccount.blob.core.windows.net")

Example 3: Navigate to a specific container and list its blobs

```powerquery

let
    Account = AzureStorage.Blobs("mystorageaccount"),
    Container = Account{[Name="reports"]}[Data]
in
    Container

Example 4: Combine all CSV blobs in a container into one table

```powerquery

let
    Account = AzureStorage.Blobs("mystorageaccount"),
    Container = Account{[Name="exports"]}[Data],
    CsvBlobs = Table.SelectRows(Container, each [Extension] = ".csv"),
    Parsed = Table.AddColumn(CsvBlobs, "Data", each Csv.Document([Content], [Delimiter=",", Encoding=65001])),
    Combined = Table.Combine(Parsed[Data])
in
    Combined

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks