Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
anawast
Microsoft Employee
Microsoft Employee

fabric.evaluate_dax() when run in context of SPN fails

We have been running a notebook which leverages fabric.evaluate_dax() through a pipeline. When the pipeline was created in the context of a user (that is my alias) everything runs smoothly. However the moment the pipeline is created by a SPN- we face a 401 unauthorised error. It says that it is unauthorised for the url: https://api.powerbi.com/powerbi/globalservice/v201606/clusterdetails, which the fabric.evaluate_dax() function is probably using internally. On the semantic model on which we want to run the dax query the permission that I have as a user and that of the SPN are identical. Does anyone have any inisghts into this?

 

anawast_0-1742188001494.jpeg

 

1 ACCEPTED SOLUTION
v-pnaroju-msft
Community Support
Community Support

Hi @anawast,

We sincerely appreciate your inquiry through the Microsoft Fabric Community Forum.

Kindly follow the troubleshooting steps mentioned below, which may assist in resolving the issue:

1.Ensure that the Service Principal Name (SPN) has the requisite Power BI API permissions in Azure Active Directory (Azure AD). Specifically, check if it has the Tenant.ReadWrite.All or Dataset.Read.All permissions. Navigate to Azure Portal → Azure Active Directory → App Registrations → Your SPN → API Permissions and confirm the assigned permissions. If any permissions are missing, add them and grant admin consent.

2.The SPN must be explicitly added to the Power BI workspace where the semantic model is located. Even if both your user account and SPN have similar permissions, SPNs require explicit access within Power BI workspaces. Ensure that the SPN is assigned at least the Contributor or Member role in the respective workspace.

 

If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will aid other community members encountering similar queries.

 

Thank you.

View solution in original post

4 REPLIES 4
v-pnaroju-msft
Community Support
Community Support

Hi anawast,

We are following up to see if your query has been resolved. Should you have identified a solution, we kindly request you to share it with the community to assist others facing similar issues.

If our response was helpful, please mark it as the accepted solution and provide kudos, as this helps the broader community.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Hi anawast,

We wanted to check in regarding your query, as we have not heard back from you. If you have resolved the issue, sharing the solution with the community would be greatly appreciated and could help others encountering similar challenges.

If you found our response useful, kindly mark it as the accepted solution and provide kudos to guide other members.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Hi anawast,

We have not received a response from you regarding the query and were following up to check if you have found a resolution. If you have identified a solution, we kindly request you to share it with the community, as it may be helpful to others facing a similar issue.

If you find the response helpful, please mark it as the accepted solution and provide kudos, as this will help other members with similar queries.

Thank you.

 

v-pnaroju-msft
Community Support
Community Support

Hi @anawast,

We sincerely appreciate your inquiry through the Microsoft Fabric Community Forum.

Kindly follow the troubleshooting steps mentioned below, which may assist in resolving the issue:

1.Ensure that the Service Principal Name (SPN) has the requisite Power BI API permissions in Azure Active Directory (Azure AD). Specifically, check if it has the Tenant.ReadWrite.All or Dataset.Read.All permissions. Navigate to Azure Portal → Azure Active Directory → App Registrations → Your SPN → API Permissions and confirm the assigned permissions. If any permissions are missing, add them and grant admin consent.

2.The SPN must be explicitly added to the Power BI workspace where the semantic model is located. Even if both your user account and SPN have similar permissions, SPNs require explicit access within Power BI workspaces. Ensure that the SPN is assigned at least the Contributor or Member role in the respective workspace.

 

If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will aid other community members encountering similar queries.

 

Thank you.

Helpful resources

Announcements
August Fabric Update Carousel

Fabric Monthly Update - August 2025

Check out the August 2025 Fabric update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.