Forum Discussion
PowerBI REST API & Access Token with Power Query
Hi rpboyer2
Good that we got that potential issue out of the way.
Given Postman is one of the most solid foundations for building PowerQueries connecting to APIs (and that you're using it), please be so kind to post here the Postman generated cURL statement for a successful request (don't forget to mask out confidential info!). Based on that we'll be able to propose the equivalent PowerQuery code.
So basically, you want a function that does what your below Postman successfully does, right?
If yes, please post the cURL generated by Postman just to be sure.
P.S.: above requests remain valid, but after re-reading again the conversation I think I've noticed you had some doubts ref the "PowerBI request". One way to see how the PowerBI request looks like is to setup a proxy of some sort, ex.:
- if you're running PowerBI locally:
- you could use Fiddler
- OR you could spawn a webserver in your preferred language (ex. python, even PowerShell etc.) and set the URL to your local webserver where you log things (this is how I usually debug)
- if you want to test a service connection, you need to get a bit more creative:
- maybe a cloud lambda/function that PowerQuery connects to...
But usually if you get it working locally in Postman, you should be able to get it working on PowerBI (at least locally).
P.P.S. 😁: When you press Connect and still get the "Access web content" dialog, I think that's a sign you're getting 301 Permission denied
Finally: others are of course free/invited to jump in anytime to help out fix this 🤗
Please mark as answer the relevant post(s) that helped you find a solution
Postman is returning the Access Key just like I'm able to get in PowerQuery. However it isnt returning any data from the PowerBI API when using the Access Key just like my PowerQuery issue. What is very confusing is that the only way i've been able to get data at all from the PowerBI API is when i use the 'Try It' feature from the documentation page & copy the Access Key generated. I can then Paste it into PowerQuery overriding my function result and then i get data. However if i take that same key that is returning data in PowerQuery and use in Postman i get the Bad Request - Group Details Parameter is required Error