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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PiotrStukin
Frequent Visitor

Expression.Error: Access to the resource is forbidden when calling for function

Hello there,
I have simple function to convert ip address to geolocation using https://api.ipstack.com/ service.
When I call for function from query I receive error access forbiden. When I invoke function itself it works fine.
I am not in Azure, I am using PowerBI desktop app. I've reset all credentials and provide correct one (function connect to ipstack and return Json data). I am stuck and I do not know where else to look.

 PowerBI Access denied.jpg

1 ACCEPTED SOLUTION
PiotrStukin
Frequent Visitor

It was one EMPTY record in the column with IP addresses. 

Expression.Error: Access to the resource is forbidden error is very misleading. 

PiotrStukin_0-1682109824336.png

 

 

View solution in original post

8 REPLIES 8
PiotrStukin
Frequent Visitor

It was one EMPTY record in the column with IP addresses. 

Expression.Error: Access to the resource is forbidden error is very misleading. 

PiotrStukin_0-1682109824336.png

 

 

PiotrStukin
Frequent Visitor

No luck. Even when I check "Ignore Privacy Levels checks for this file".
Again, I can see PowerBI is talking to ipstack.com (I see requests on ipstack.com dashboard). I can Invoke function "manually" providing IP address and it returns vaules.
It won't work when I am trying to add column (Add Column / Invoke Custome Function).


2023-04-18_15-43-11.jpg 

PiotrStukin
Frequent Visitor

Anyone have any ideas? The only last thing I want to try is run Power BI on brand new VM or computer with fresh Windows installation and check if this will work.

PiotrStukin
Frequent Visitor

Interesting fact. When I check ipstack API statistics I can see there is a lot of requests. So PowerBi talks to ipstack.API StatisticsAPI Statistics

lbendlin
Super User
Super User

Which privacy level did you select for that connection?  

 

Note: You may not want to put your API key on the interwebs.

Yeah, I've noticed API key has been exposed, and I replaced my API key right away.
I tried each level, it returns the same error every time.

When I hit Apply in Power Query Editor I get this:

Invoked Function
Load was cancelled by an error in loading a previous table.
Locations
OLE DB or ODBC error: Exception of type 'Microsoft.Mashup.Engine.Interface.ResourceAccessForbiddenException' was thrown..


I've been using that model for years, never had a problem. I have no idea what changed and why.

 

Which privacy level did you select for that connection?  

I tried all of them: none, public, organizational and private. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.