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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
kaym
Helper I
Helper I

Error 405: Method Not Allowed

Hello,

I am trying to load data through an API URL. However, I see this error as soon as I enter the URL. I was givien this URL by a team member who worked on this API. All I know is that it uses basic authentication and is a POST method.

 

kaym_0-1707160242402.png

 

2 REPLIES 2
Anonymous
Not applicable

hi, @kaym 

I'm happy to answer your questions. Sorry to hear you are getting a 405 error when using the API URL to get data. According to the RFC2616 document, 405 error is defined as follows:

The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow header containing a list of valid methods for the requested resource.

We can troubleshoot the problem through the following points:

1.Check the API documentation: You should first make sure you are using the API URL correctly. For example, parameters that need to be passed and other conditions.

2.Try to connect using Advance method: Pass in the relevant parameters and ensure that the necessary request parameters are in the header. For example, User-Agent parameters, Content-type parameters, etc. If there are missing parameters in the post method, a 405 error will occur if the authentication is successful. As is the case with my second link for the same case below.

vjianpengmsft_0-1707210639267.png

3.Try sending the same request using other tools to determine whether the request is successful. If the request is successful, there is a problem with the settings in Power BI. If the request is unsuccessful, there is a problem with the API URL. Try adding the necessary parameters.

4.Try using Power Query to get the data.

 

 

RFC2616 document: https://www.ietf.org/rfc/rfc2616.txt

405 error document:https://learn.microsoft.com/en-us/aspnet/web-api/overview/testing-and-debugging/troubleshooting-http...

Cases of the same problem:

https://community.fabric.microsoft.com/t5/Power-Query/API-request-405-Method-not-Allowed-Error/td-p/...

Solved: Re: HTTP Actions - Power Platform Community (microsoft.com)

Use post method to get data in Power Query: https://datawithdom.com/2022/03/using-the-post-method-with-rest-apis-inside-power-bi/

 

 

 

 

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

HI @Anonymous ,

This is super helpful! 

I tried fixing it in power query but I am still getting errors like:

Expression.Error: The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Range, Referer


OR

DataSource.Error: Web.Contents with the Content option is only supported when connecting anonymously. Details: DataSourceKind=Web

this is how the API request should be:

kaym_0-1707245384165.png

 

API uses basic authentication and has a user encrypted

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors