Error 403 when trying to read data form a data set
I'm working on a server-side integration for a client, which needs to connect to the Power BI API and read information from a Data Set. According to the Power BI documentation, this requires the permissions: Report.ReadWrite.All or Report.Read.All.
If I go to Azure and search for the app, these permissions are granted. What catches my attention is that when I generate an access token and try to access the report, it returns a 403 Forbidden error.
I'm not sure if the issue lies in the call that generates the access token, perhaps it's not being made with sufficient permissions.
If I try to change the scope to "readAll," it tells me that the scope is invalid and must be "/.default."
On the other hand, I understand that the access token generated by this call should be able to access the reports if the app in Azure AD has the necessary permissions. However, when I try to access the report, I receive a 403 error.
Lastly, when trying to acces the data in the report, this is the url I'm targeting:
I tried everything but without success, but in the end the issue was in the configuration of the Azure AD app, and not having a security group created in Azure AD. Once we created one, we were able to connect to Power BI API using the access token that I showed in my initial post.