Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
3 |