We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I've run curl --write-out %{json} --request GET https://api.powerbi.com/v1.0/myorg/gateways/ce5813c2-373b-4e0a-82f6-a7fe5483dd14
And I get this error
{"error":{"code":"PowerBINotAuthorizedException","pbi.error":{"code":"PowerBINotAuthorizedException","parameters":{},"details":[],"exceptionCulprit":1}}}
you need to first authenticate before you can call these endpoints.
I do use this code to create a bearer token and then apply this token to the CURL statement but I still recieve this error:
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=client_credentials&client_id=<client_id>&resource=https://analysis.windows.net/powerbi/api&client_secret=<client_secret>" https://login.microsoftonline.com/52da6ceb-c432-45d8-9cee-97902996ced9/oauth2/token
Hi @Anonymous ,
As far as I know, you can try to call the Power BI Rest API by Postman, you can use the bear token in it.
For reference: Solved: Power BI REST API Authentication with Postman - Microsoft Fabric Community
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dear v-rzhou-msft,
I’ve ran the same request in Postman and still receive the same error.
Regards,
Run it in the Power BI REST API sandbox.
So I've looked at the sandbox and the APIs seem to be of the reporting kind and not access to gateway.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |