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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.