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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
itz4blitz
New Member

embedToken GenerateTokenAsync returning BadRequest error

I'm following the Power BI Developer In A Day course

 

I've went back over the videos and my settings several times:

I have a brand new E3 trial account.

I have imported the Sales Reports pbix into BI

I've created the appropriate "Power BI Apps" Group in Azure AD

In App Registrations I've setup "Sales Reporting" and configured the appropriate Certificate & Secret.

In PowerBI Admin; I've set the proper permissions under Developer Options

The AzureAD and PowerBi lines in my appsettings.json are configured with the correct Instance, Domain, TenantId, ClientId, ClientSecret, and WorkspaceId.

When the code calls GetReportsEmbeddingData in the provided PowerBiApiService class (included in the DevKit), I hit this error when building my MVC app and running. I've set a breakpoint and was able to see the EmbeddedReport object gets passed in with valid data.

 

itz4blitz_0-1642078670263.png

 

I was going to try catch the error but I wasn't certain how to handle or convert the exception properly.

2 REPLIES 2
Anonymous
Not applicable

Hi @itz4blitz ,

Based on the error message, it seems that there is a problem in generating and getting the token. Are you using the embed analytics solution Embed for your customers? If so, please check if you hit any of the consideration in the document below.

Considerations when generating an embed token

yingyinr_0-1642491081409.png

Considerations and limitations

In addition, please review the solution in the following links. Hope they can help you resolve the problem.

400 Bad Request Error when embedding report

Power BI Embedded with Roles, allowing Row Level Security

Best Regards

itz4blitz
New Member

In case it helps: I'm on Module 4, Video 2. I've taken all of the steps outlined in the series so far and am attempting to view the report I've embedded into the view.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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