Forum Discussion

ckingdon_bee's avatar
ckingdon_bee
Frequent Visitor
1 year ago
Solved

Unknown Error when calling the initializeConnection Fabric Git API endpoint with a service principal

Hi there,   I am experiencing an issue when following the documentation here: https://learn.microsoft.com/en-us/fabric/cicd/git-integration/git-automation?tabs=service-principal%2CADO   I copied ...
  • ckingdon_bee's avatar
    1 year ago

    With some great help from Microsoft we finally figured out the solution. It was a combination of three items that we had to solve. The first item was in the Fabric Admin Portal. We had to enable the following setttings: 

    • Service principals can access read-only admin APIs
    • Service principals can access admin APIs used for updates

    In addition these settings the second item that is required is that you put your service principal into an Entra AD group:

    The second thing we had to do was reconfigure our service principal setup in the app registration. In my own troubleshooting I had added several Fabric/PowerBI related API permissions. As mentioned in this document: Embed Power BI content with service principal and an application secret 

    These permissions are no longer needed once you enable the Fabric API setting and in fact can cause issues. See this callout:

    The solution was to remove all of the permissions besides the default one you get when you create an app registration:

    After doing these 3 steps we are now able to sync our workspaces with GIT via a service principal inside of GitHub Actions workflow. As a bonus it also supports using federated credentials instead of having to rely on a client secret!