Forum Discussion

P108's avatar
P108
Frequent Visitor
1 month ago
Solved

Automated data-quality checks on Power BI semantic models using service principal

Hello everyone, I am testing automated data-quality checks against Power BI semantic models using the Power BI REST API. The goal is to run DAX queries against a semantic model as part of a daily wo...
  • P108's avatar
    P108
    1 month ago

    Thank you, this pointed me in the right direction.

    I tested this further. I ran the simplest possible ExecuteQueries request:

    EVALUATE ROW("Test", 1)

    It still returned PowerBINotAuthorizedException on the affected semantic model, so the request was being blocked before any table/query logic was evaluated.

    I then found that the model had a role defined in Manage roles. There were no members assigned to the role in Power BI Service, but the role definition still existed in the model.

    As a test, I removed the role from the model and reran the same ExecuteQueries request with the service principal. After removing the role, the request worked.