Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
We finally managed to embed a report with Direct Query thanks to a colleague.
The steps was :
* first the login api to get the access_token
* then a GET on the report to get the embedUrl value AND the datasetId. (url : https://api.powerbi.com/v1.0/myorg/groups/<GroupId>/reports/<ReportID>)
* finally a POST on GenerateToken to get the token, tokenID and expiration date (url: https://api.powerbi.com/v1.0/myorg/GenerateToken, and NOT https://api.powerbi.com/v1.0/myorg/groups/<GroupId>/reports/<ReportID>/GenerateToken)
In this last API, you have to provide a json like this :
{
"datasets": [
{
"id":"<your dataset ID>",
"xmlaPermissions": "ReadOnly"
},
{
"id":"<the datasetId you get from the Report Api>",
"xmlaPermissions": "ReadOnly"
}
],
"reports": [{
"id": "<your report ID>",
"allowEdit": false
}],
"targetWorkspaces": [
{
"id": "<your group/workspace ID>"
}
]
}
Thanks for your help !
HI @BertrandK,
if you not familiar about the IdentityBlobs structure usage, you can take a look at official document sample about generating an embed token for a Power BI report with a dataset which is connected with DirectQuery to another Power BI dataset :
Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Regards,
Xiaoxin Sheng
HI @BertrandK,
I'd like to suggest you take a look at dataset related API to get the detail datasource informations:
Datasets - Get Datasources In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Regards,
Xiaoxin Sheng
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |