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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. 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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.

Top Kudoed Authors