Forum Discussion
pedrosilvacreit
1 year agoRegular Visitor
Error 403 "User is not authorized" returned when calling GenerateTokenInGroup Power BI API
Hello. I'm trying to use service principal to authenticate an Entra ID app, to then generate a token to use to embed a Power BI report. I've followed the steps in this link, register the app, wit...
pedrosilvacreit
1 year agoRegular Visitor
Hello Anonymous!
Thanks for your response.
1. No, I don't have those API permissions added. The documentation I saw said that service principal authentication didn't require API permissions.
2. Yes, I've granted both the service principal and the security groups the Admin role to the workspace.
Anonymous
1 year agoNot applicable
Hi pedrosilvacreit ,
Thanks for your reply. Could you please check the following info?
1. Make sure the client id and client secret fill in correctly, especially for the value of client secret. You can refer the following links to get them
2. Enable the Power BI service admin settings
Enable Embed content in apps
Enable Allow service principals to use Power BI APIs
Permission tokens needed to embed a Power BI app - Power BI | Microsoft Learn
Best Regards