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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors