Forum Discussion

amitpatra's avatar
amitpatra
New Member
1 year ago
Solved

Service Principal authentication method not working in PBI dataset refresh

Hello,   I am trying to setup Service Principal authentication method for the data source credentials in dataset refresh. But, I am getting error - login failed. The Service Principal/App has all t...
  • Akash_Varuna's avatar
    1 year ago

    Hi amitpatra It might be because the Service Principal lacks proper permissions on the dataset or gateway. Ensure it has tenant-wide API access enabled, workspace access as a Contributor or Member, and proper database or gateway permissions. Once set, the dataset will refresh using the Service Principal even if your ID is deleted.

  • v-pnaroju-msft's avatar
    1 year ago

    Thank you, Akash_Varuna, for your response.

     

    Hi amitpatra,

    We appreciate your inquiry through the Microsoft Fabric Community Forum.

    Based on my understanding, the error "Login failed for user '<token-identified principal>'" indicates that the Service Principal lacks one or more required permissions or configurations.

    Please follow the steps below which may help to resolve the issue:

    1. Ensure that the Service Principal is granted access at the database level. Additionally, confirm that the Azure SQL Server has an Azure AD admin set.
    2. Make sure the following options are enabled in the Power BI Admin Portal. Allow service principals to use Power BI APIs and Allow service principals to access datasets.
    3. Assign the Service Principal as a Member or Contributor role in the workspace, either directly or via an Azure AD group.
    4. Add the Service Principal under the Gateway (for on-premises data source) > Users. Ensure it has access to the related data source.
    5. Once configured, all dataset refreshes will run via the Service Principal, even if your personal account is removed, as long as the credentials remain valid and permissions are not revoked.

    If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members who may be facing similar queries.

    Thank you.