Forum Discussion
403 Forbidden error occured when using REST API
Anyone find a solution to this? I'm having the same issue. We receive the access token in our REST service and I'm passing it to the Power BI REST api and we get this same error.
The issue is that the default registration of an app in Azure AD requires the user click a button saying "I trust" this app. If you look at this video:
https://www.youtube.com/watch?v=ZSaBFf3ziUk
and go into the video about the 2:15 mark. This shows with simple app registration there is a one-time need for user interaction. After logging the first time with user interaction, your code can then authenticate programmatically without user interaction.
There is a way around this. It requires that you have an Azure subscription and that you use the Azure portal to register the app and configure security settings so that it doesn't require interactive consent on the part of the user.
- khurram759 years agoFrequent Visitor
I tried adding the permissions and pretty much everything described on the "How To" tutorial, however still am not able to get beyond the 403 error. The code works fine in http://docs.powerbi.apiary.io but I am unable to make it work through code :( For authentication our app uses the approach where it does not require the user to approve the access permissions in the pop up mentioned above. Do we have to enable it for PowerBI to work?