Forum Discussion
atorrescalderon
5 years agoNew Member
I cannot access the data source
I need help with the ip range that power bi uses. In the power BI web access, when entering the user and password data, it shows me the error message: 'A connection attempt failed because the connect...
edhans
5 years agoCommunity Champion
atorrescalderon - this document has a list of all Azure related services and their IP addresses. Download Azure IP Ranges and Service Tags – Public Cloud from Official Microsoft Download Center
It is a JSON file. If you use this M code you can get the list of IP ranges for Power BI.
let
Source = Json.Document(File.Contents("C:\ThePathToThe JSONFILE\ServiceTags_Public_20210802.json")),
values = Source[values],
#"Converted to Table" = Table.FromList(values, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"name", "id", "properties"}, {"name", "id", "properties"}),
#"Filtered Rows" = Table.SelectRows(#"Expanded Column1", each ([name] = "PowerBI")),
#"Expanded properties" = Table.ExpandRecordColumn(#"Filtered Rows", "properties", {"changeNumber", "region", "regionId", "platform", "systemService", "addressPrefixes", "networkFeatures"}, {"changeNumber", "region", "regionId", "platform", "systemService", "addressPrefixes", "networkFeatures"}),
#"Expanded addressPrefixes" = Table.ExpandListColumn(#"Expanded properties", "addressPrefixes")
in
#"Expanded addressPrefixes"
How to use M code provided in a blank query:
1) In Power Query, select New Source, then Blank Query
2) On the Home ribbon, select "Advanced Editor" button
3) Remove everything you see, then paste the M code I've given you in that box.
4) Press Done
5) See this article if you need help using this M code in your model.