Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Building API Error: Formula.Firewall: Query (step 'Source') references other queries or steps

I am new to Power Query / Mashup and have been trying to build an API call (code below). I believe I finally have the code formatted properly but I am getting the Formula.Firewall: Query references other queries error. I did some extensive searching on this and, yes, I see several threads that link back to this article - but I've already attempted this in my solution below. I broke out multiple sources so that my bearer query is different. (The "ChoiceBearerTokenGet" returns the (very long) token. The screenshot of the "myBody" variable is in the screenshot below my code.

 

Any help would be appreciated!

 

 

 

let
    myBearerVariable = ChoiceBearerTokenGet,
    Date = Date.ToText(#date(Date.Year(DateTime.LocalNow()),Date.Month(DateTime.LocalNow()),Date.Day(DateTime.LocalNow())),"yyyy-MM"),
    myUrl = "https://licensing-eastus-release-b.citrixworkspacesapi.net/ChoiceSoluti/licenseusages/deployments/cloud/memberships/csp/products/cvad?date="&Date,
    myTokenHeader = "CwsAuth Bearer=" & myBearerVariable,
    myBody = "{
                ""authorization"": """& myTokenHeader & """,
                ""content-type"": ""application/json"",
                ""Accept"": ""application/json""
            }",
    Source = Json.Document(
            Web.Contents(
                myUrl,
                [
                    Headers = Json.Document(myBody)
                ]
            )
    ),
    singleTenantsUsage = Source[singleTenantsUsage],
    #"Converted to Table" = Table.FromList(singleTenantsUsage, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"customerId", "orgId", "displayName", "editionName", "totalCommitCount", "totalUsageCount", "totalOverageCount", "totalUsagePercent"}, {"Column1.customerId", "Column1.orgId", "Column1.displayName", "Column1.editionName", "Column1.totalCommitCount", "Column1.totalUsageCount", "Column1.totalOverageCount", "Column1.totalUsagePercent"}),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Column1",{{"Column1.displayName", "Company"}, {"Column1.editionName", "sku"}, {"Column1.totalCommitCount", "totalCommitCount"}, {"Column1.totalUsageCount", "totalUsageCount"}, {"Column1.totalOverageCount", "totalFlexCount"}, {"Column1.totalUsagePercent", "totalUsagePercent"}, {"Column1.orgId", "CitrixCompanyorgId"}, {"Column1.customerId", "CitrixCustomerId"}})
in
    #"Renamed Columns"

 

 

 picture.jpg

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

Check this topic see if it's helpful.

https://community.powerbi.com/t5/Power-Query/Formula-Firewall-Error/m-p/1061155 

 

Best Regards,

Jay

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.