Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I am trying to connect to a REST API from Power BI desktop using following code but it is always returning 400 bad request. However, when I am trying to connect to this API with same data and same header from a generic client like RESTESD chrome extention, it is successful. In fiddler, I observed one thing that when request is sent from RESTED , it is creating 3 rows in fiddler withh status code 407,407,200 respectively ( only the first row but when I am tryng to connect from PowerBI desktop, I see only 2 rows 407,200. I do not see any 400 in Fiddler though.
let
authKey = "Basic " & Binary.ToText(Text.ToBinary("Client-id:ClientSecret"),0),
url="https://urlxxxxxx/oauth/token",
Source = Web.Contents(url,
[
Headers=[Authorization="authKey", #"Content-Type"="application/x-www-form-urlencoded"],
Content =Text.ToBinary("grant_type=client_credentials")
]
)
in
Source
....
.......
Solved! Go to Solution.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |