Forum Discussion
Embedding Paginated Report with a Power BI Dataset
Well, it's January 10th, so is going to be Jan or when do you think? Just wanted a guesstimate is all.
Please give it another week
Thanks
Aviv
- AmosHersch4 years agoMicrosoft Employee
This is now available. You should use the latest .Net SDK, see some guidance here:
Thanks,
Amos
- Anonymous4 years agoNot applicable
So, we have implemented the code in our .net application and we are able to see our paginated report through our embedded web application. However, we are seeing an issue where the provided EffectiveIdentity username is not showing correctly in the Paginated Report's username parameter. This parameter is showing the &User.UserId property, however, this value has the service principal GUID instead of the effective identity username provided in the api call. Code in call:
generateTokenRequestV2Parameters = new GenerateTokenRequestV2(datasets: dataSetIdV2, reports: reportIdV2, identities: new List<EffectiveIdentity> { new EffectiveIdentity(username: upn, roles: new List<string> { roleName }, datasets: new List<string> { dataSetId }) });
accessToken = client.EmbedToken.GenerateToken(generateTokenRequestV2Parameters);
The upn value in this case is my email address '[email protected]', which should show up in the pagainated report parameter for &User.UserId instead of the SPN GUID.
- AmosHersch4 years agoMicrosoft Employee
Hi,
When you provide an effective identity in the generateToken request it should either be an effective identity for the paginated report or an effective identity for the Power BI dataset.
If you want the username to be the identity passed to the report then should should provide the reportId and not the datasetId. Something like this:
new EffectiveIdentity(username: upn, , reports: new List<string> { reportId })
In addition you can specify another identity for the dataset, with the roles, etc.
Thanks,
Amos
- srarden4 years agoRegular Visitor
Trying to test this out this feature in paginated reports using the embed .NET example code locally, and getting the error:
Could not connect to the data source.
There was an error contacting an underlying data source. Manage your credentials or gateway settings on the management page.Both the report and underlying dataset are in the same workspace which is attached to a premium per capacity. Able to embed and reach the dataset in regular Power BI reports embedded, so the gateway is okay - using ServicePrincipal.