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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.