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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Import from Web API error

Hi friends,

I am trying to import from World Bank resource (http://www.worldbank.org/) through API.

When I type in the following call in the browser - it works fine:

http://api.worldbank.org/V2/incomeLevel/LIC/country

But when I create a new Web Query in Power BI Desktop - it gives me an error:

"Unable to connect: 

We encountered an error while trying to connect.

Details: "Access to the resource is forbidden."

I have cleaned the Global Data Source permissions, tried again, chose "Anonymous" authentication...

Still - the same error.

I am able to connect to the same url in the Dataflows - so the url and Anonymous authentication are working.

Something in my Desktop?

Please suggest

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Ok.

I think my IT Department is blocking API calls from inside applications (but not from browser)

That's why it is not working.

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Ok.

I think my IT Department is blocking API calls from inside applications (but not from browser)

That's why it is not working.

 

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

Have you solved your problem?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please feel free to ask.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,


But when I create a new Web Query in Power BI Desktop - it gives me an error:

"Unable to connect: 

We encountered an error while trying to connect.

Details: "Access to the resource is forbidden."


 

Do you mean that you create a Web query in Advanced Editor?

 

Please have a reference of the query below.

 

let
    Source = Xml.Tables(Web.Contents("http://api.worldbank.org/V2/incomeLevel/LIC/country"))
in
    Source

More information here: https://msdn.microsoft.com/en-us/library/mt260892.aspx

and here: https://blog.crossjoin.co.uk/2014/03/26/working-with-web-services-in-power-query/

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.