Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I would be greatful for any help on a problem we have, we're wanting to use Power BI Embedded but to prototype the calls we're using the Rest Client extension in VSCode.
We have a service principle set up, this successful calls the APIs under graph.microsoft.com and management.azure.com by getting an azure AD V2 token.
This service principle will not be using delegated authorisation. It's been set up in a security group (PowerBiGroup) as per instructions.
Under Power BI we have a PPU user as an admin user and in the Power BI admin portal they have enabled:
There is a workspace and the PowerBiGroup have been added as an admin.
Despite these settings I can auth fine, get a bearer token but every API call I make fails with a 403, I've tried:
Using the format:
GET https://api.powerbi.com/v1.0/myorg/groups
Authorization: bearer {{$aadV2Token appOnly}}
Apart from the MS documentation and various posts out there I've also watched this tutorial https://www.youtube.com/watch?v=3RidKdK2KOM as well as cloned the github repo to show various calls.
Please can anoyone help as this is very frustrating as we eventually want to use Power BI embedded for customers but have spent a long time trying to get service principles to work in any capacity.
Solved! Go to Solution.
Found the problem:
GET https://api.powerbi.com/v1.0/myorg/groups
Authorization: bearer {{$aadV2Token appOnly}}
Should be:
GET https://api.powerbi.com/v1.0/myorg/groups
Authorization: Bearer {{$aadV2Token appOnly}}
The other Azure REST APIs don't complain with using "bearer", the Power BI APIs fail without "Bearer".
Found the problem:
GET https://api.powerbi.com/v1.0/myorg/groups
Authorization: bearer {{$aadV2Token appOnly}}
Should be:
GET https://api.powerbi.com/v1.0/myorg/groups
Authorization: Bearer {{$aadV2Token appOnly}}
The other Azure REST APIs don't complain with using "bearer", the Power BI APIs fail without "Bearer".
Power BI studio works with a local Power BI user.
Delegated API calls work as well.
Have you considered using ready made tools?
Release of Power BI Studio v2.0 (VSCode extension) – Gerhard Brueckl on BI & Data
Thank you, that is something to look at, even just to see APIs are accessible.
This is more about how to learn the API behavior so we can automate later in an app etc.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
9 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
11 | |
3 | |
2 | |
2 | |
2 |