Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
josephrxavier
New Member

Unable to generate token for paginated report

Hi, 

We are trying to embedded paginated report to Asp.net MVC application. While trying for that facing issue on Generate token step and getting 'Bad Request' error. With the similar parameters we are able to generate token for regular PowerBI Report.

 

We are using Microsoft.PowerBI.API nuget package for generate token and embedd purpose.

 

Sample code :

 

var generateTokenRequestParameters = new GenerateTokenRequest(accessLevel: View,
identities: new List<EffectiveIdentity> { new EffectiveIdentity(
username: userId.ToString(),
reports: new List<string>{ reportId.ToString()})});

tokenResponse = client.Reports.GenerateTokenAsync(groupId, reportId, generateTokenRequestParameters).Result;

 

Are we missing some parameter here?. Thanks in advance.

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @josephrxavier ,

 

According to the offical blog, steps of embedding paginated report is similar as embedding Power BI Report. Please check whether you have conigufred the capacity correctly.

Here are some offical blogs about how to Embed paginated reports.

For reference:

Embed Power BI paginated reports

Embed a paginated report

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
josephrxavier
New Member

Thanks for the suggestions. I tried to check more on embedding paginated report and found like we need to use service principal account for embedding instead of master user. So checking on this direction. Please correct me if it is wrong.

AmosHersch
Employee
Employee

Hi @josephrxavier ,

 

You can also try to see if you got any meaningful information in the response body. Sometimes it has more detailed info about the reason you got the bad request error.

Please note that some scenarios aren't supported, for example if your paginated report has a Power BI Dataset as a Datasource (that's coming soon), or if one of your Datasources is configured with SSO enabled.

 

 

v-rzhou-msft
Community Support
Community Support

Hi @josephrxavier ,

 

According to the offical blog, steps of embedding paginated report is similar as embedding Power BI Report. Please check whether you have conigufred the capacity correctly.

Here are some offical blogs about how to Embed paginated reports.

For reference:

Embed Power BI paginated reports

Embed a paginated report

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.