Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am working on a project to embed a report into our website. I have one dataset per customer and I want to dynmaically bind the report to the dataset at the time of embed.
My report has a dataset associated with it and this dataset connects to one of the customers' datasets via direct query. I am trying to generate the embed token using Powershell with the method described here.
$bodyUser = [PSCustomObject]@{
datasets = @(
[PSCustomObject]@{
id = "xxxxxxxx-report-dataset"
xmlaPermissions = "ReadOnly"
},
[PSCustomObject]@{
id = "xxxxxxxx-custer-dataset1"
xmlaPermissions = "ReadOnly"
},
[PSCustomObject]@{
id = "xxxxxxxx-custer-dataset2"
xmlaPermissions = "ReadOnly"
}
)
reports = @(
[PSCustomObject]@{
id = "xxxxxxxx-reportID"
}
)
datasourceIdentities = @(
[PSCustomObject]@{
datasources = @(
[PSCustomObject]@{
datasourceSelector = [PSCustomObject]@{
datasourceType = "ODBC"
}
connectionDetails = [PSCustomObject]@{
connectionString = "dsn=akpidatalake"
datasourceId = "xxxxxxxxxxx"
gatewayId = "xxxxxxxxxxx"
}
},
[PSCustomObject]@{
datasourceType = "AnalysisServices"
connectionDetails = [PSCustomObject]@{
server = "powerbi://api.powerbi.com/v1.0/myorg/embedded_poc"
database = "embedded dataset kap"
}
datasourceId = "xxxxxxxxxxx"
gatewayId = "xxxxxxxxxxx"
}
)
}
)
}
$jsonBody = $bodyUser | ConvertTo-Json -Depth 10
I am getthing this error:
Encountered errors when invoking the command: { "code": "InvalidRequest", "message": "Datasource identity must contain identity blob" }
Where do I get the indentity blob?
Hi @kpia ,
If you don't have any external data source with SSO then just don't send the datasourceIdentities in your request. It's only required when you do have SSO.
datasourceIdentities array is only required if you have external data sources (SQL/...) with SSO enabled. In such case this array is for providing access tokens (identity blobs) for those data sources. Since those are your data sources you should know how to create access tokens for them (not through Power BI).
If you don't have such data sources then you should not provide the datasourceIdentities array at all.
Thank you @AmosHersch for your response. It strange because we aren't using SSO so I'm not sure why it is giving this error message.
We are using ODBC to connecto to AWS Athen with standard credentials via a gateway. Shouldn't the gateway handle all the credentials?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 11 | |
| 7 | |
| 4 | |
| 4 | |
| 3 |