Authenticating with Service Principal Credential - SQL Power BI

MuthuKasi-MSFT 20 Reputation points Microsoft Employee
2023-10-12T13:06:11.7366667+00:00

I am using the App-Owns-Data embed scenario in a multi-tenant environment. Some of my paginated reports need a connection to Fabric Lakehouse.

When assigning a report to a tenant (copying the report from the master workspace) I need to patch credentials. I am using PowerBI API 4.16. - Gateways.UpdateDataSourcesAsync method. I am trying to patch the credentials of a service principal. I've tried to create credentials using basic authentication as well as OAuth2. I am unable to patch Service Principal credentials (receiving Unauthorized responses from the API. The same happen when I try Service Principal authentication over the Azure SQL database.

Azure SQL Database
Microsoft Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
6,149 questions
0 comments No comments
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 29,017 Reputation points Microsoft Employee
    2023-10-12T21:27:16.5733333+00:00

    Hi,@MuthuKasi-MSFT Welcome to Microsoft Q&A thanks for posting your question

    Did you add the Service Principal to the workspace and grant the SPN access to the appropriate tables in the SQL Endpoint?  Also, you don’t need a gateway to connect to the Fabric LH.  The paginated report should just run directly against the SQL Endpoint.

    If this is in a customer tenant, you have to make sure the tenant switch is enabled to "Allow for Service Principals for PBI APIs"  

    User's image

    However SPN auth is not supported in GWs just yetService principal support to connect to data in Dataflow, Datamart, Dataset and Dataflow Gen 2 | Microsoft Fabric Blog | Microsoft Fabric

    User's image

    I hope this information helps

    Regards

    Geetha

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful