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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
alashkarwala
New Member

GenerateTokenRequest returns Operation returned an invalid status code 'BadRequest' error

We are using the PowerBI embed feature to embed PowerBI reports in our MVC .Net application. It works for all kind of reports excepts for Paginated reports. For paginated reports when we try to generate a token using GenerateTokenInGroupAsync method, it returns Operation returned an invalid status code 'BadRequest' error.

 

We are using the following piece of code to generate token, are we missing anything here for Paginated reports?

---------------------------------------------------------------------------------------------------------------------------

GenerateTokenRequest generateTokenRequestParameters = new GenerateTokenRequest(accessLevel: "view");

var tokenResponse = await client.Reports.GenerateTokenInGroupAsync(WorkspaceID, report.Id, generateTokenRequestParameters);

2 REPLIES 2
saleti
Frequent Visitor

Any solution for this issue yet?

We were using Embed token to embed paginated report in our app which was incorrect. A paginated reports needs an Access token.

In fact Access Token should be enough to embed any powerBI report in your application.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.