Forum Discussion
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"
1 Reply
- AnonymousNot 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