Forum Discussion
Abrandhaug
3 years agoRegular Visitor
Generating AccesToken in order to use PowerBI reports API
Hi, I've read all the previouse posts regarding this topic, but it seems I'm still kinda stuck. As of now I've registered my App within app registrations in AAD. I've also added a security g...
Anonymous
3 years agoNot applicable
Hi Abrandhaug ,
According to the error message, it seems that service principal didn't have the proper permission. Did you add that service principal as the member/admin of the corresponding workspace just as describe in this official documentation?
In addition, please check the following threads which have the similar problem as yours. Hope that the solution can also help you solve the problem.
Power Bi REST API - 401 Authorization error when using Service Principals
Add the Service Principal as an admin in the workspace directly rather than add the security group.
Acquired token gives 401 Unauthorized when trying to create DataSet
App registration (service principal) needs to be a member of a Security group
Best Regards