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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply

Fetch data from Auth2.0 API data source

Hello,

 

I am trying to add a new Auth2.0 API datasouce to my BI report, however I keep getting an error message says "We encountered an erro while trying to connect" "Details: "Web.Contents failed to get contents from 'https://aisegypt.powerschool.com/ws/schema/query/com.esol.essamx.googleworkspace.students/' (405): "

 

Attached some screenshots from the error and configuration I am using.

 

Could you please advise ?

 

API1.JPGAPI2.JPGAPI3.JPG

 

 

 

 

1 ACCEPTED SOLUTION

I figured out by passing a blank content. 😀

Content = Text.ToBinary("")

Thanks for everyone.

View solution in original post

4 REPLIES 4

I figured out by passing a blank content. 😀

Content = Text.ToBinary("")

Thanks for everyone.

lbendlin
Super User
Super User

Specifying POST won't help you .  You need to provide a payload to switch the request from GET to POST.

 

405 Method Not Allowed

 

Which method does your API expect?

It does expect POST method. kindly find belowall the details for preload. 

 

POST https://YOURSERVER/ws/schema/query/com.mycompany.mydivision.student.studentnumber
Accept: application/json
Content-Type: application/json
Authorization: Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

 

Read about how to use the Content option in Web.Contents()

 

Web.Contents - PowerQuery M | Microsoft Docs

Helpful resources

Announcements
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.