AzureEnterprise.Contents

Updated on

AzureEnterprise.Contents is a Power Query M function that returns the binary results of the call to the URL provided for the Azure Enterprise API.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

AzureEnterprise.Contents(
   url as text,
   optional query as nullable record,
) as binary

Description

Returns the binary results of the call to the url provided for the Azure Enterprise API.

Examples

Using the AzureEnterprise.Contents function to return the results of a specific report.

// Output: Table
        let
            report = Table.FromColumns( {Lines.FromBinary( Binary.Buffer( AzureEnterprise.Contents( "https://ea.azure.com/rest/12345/usage-report", [month="2014-04", type="summary", fmt="Csv"] ) ),null,null,1252 )} ),
            skips = Table.Skip( report, 2 ),
            split =  Table.SplitColumn( skips, "Column1", Splitter.SplitTextByDelimiter( ",", QuoteStyle.Csv ) ),
            promoted = Table.PromoteHeaders( split )
        in
            promoted

Other functions related to AzureEnterprise.Contents are:

Contribute » | Contributors: Rick de Groot