Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
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
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.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
3 |