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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Power BI Embedded suddenly not working

Hello,

We embed the Power BI reports into our application using Service Principal. From one day to another the pbiClient.EmbedToken.GenerateToken(tokenRequest) stopped working and we get  {"Operation returned an invalid status code 'Forbidden'"}. The token request contains all the correct parameters: WorkspaceId, ReportId, DatasetId and the Azure AD parameters are also the correct ones. The "Embed content in apps" and "Allow service principals to use Power BI API" are enabled in PowerBI -> Admin Portal. Also, Service Principal is set as admin on the workspace. The day after the embedded stoped working Azure AD Client secret expired and I created a new one that is used now when retrieving in code the AzureAd accessToken.

Can anyone help me with what could be the issue?

2 REPLIES 2
Anonymous
Not applicable

HI @Anonymous,

I suppose this should be related to the client secret expired. When account expired, the backend processing and correspond verification will also be blocked for security reasons due to the account is invalid until it reactive.

In addition, you also need to update these codes to use new version secret strings in embedded requests.

Regards,
Xiaoxin Sheng

Anonymous
Not applicable

Hello,

As an update, it is not related to client secret. The error when a client secret expires is quite explicit: "The provided client secret keys of the app ' ' expired". The only fix I could find was to recreate the Azure app and use the new Service Principal in Power BI and back end code. I tested on the new app the expiration of the client secret and I could not replicate the "Forbidden error message". The remaining issue is we don't know how to prevent this from happening again since we did not identify the source.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.