Forum Discussion
401 Unauthorized When Calling Power BI Cloud Gateway REST API with Service Principle
- 1 year ago
Hi KhadarA ,
Sorry you are still facing the issue.If you are still getting the error, please consider raising a support ticket for further assistance.
To raise a support ticket for Fabric and Power BI, kindly follow the steps outlined in the following guide:
How to create a Support Ticket
Hope this helps!
Hi KhadarA ,
Sorry that you are still facing the issue-
Try to add the Service Principal as an admin in the workspace directly rather than adding the security group, and use Object ID.
Refer-
https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal?tabs=azure-portal#get-started-with-a-service-principal
I'm afraid you can't call the Admin REST API if the Service Principal doesn't have the permission.
Also check-
If you are still facing the issue, let me know, we can help you with raising a Support Ticket.
Hope this helps!
- KhadarA1 year agoFrequent Visitor
Hey v-sdhruv , Sorry for getting back soo late.
I checked my workspace access, I have given permission to service principle directly. The issue is something else I feel. even when i try to call this api via postman using servcie principle its failing. with 401 error.
and the cloud connection is a Azure SQL Database connection.