Forum Discussion

CasperRademaker's avatar
CasperRademaker
Regular Visitor
1 year ago
Solved

Cannot get Power BI API POST call for "Datasets - Execute Queries In Group" to authorize

Hi all,   I'm trying to call one of these two endpoints using Python, but running into 401 Unauthorized without any details from the API response.   https://learn.microsoft.com/en-us/rest/api/pow...
  • CasperRademaker's avatar
    1 year ago

    I resolved the issue myself. For anyone else running into this: the issue was the semantic model having row-level security enabled. It seems you cannot use service principals in this case. 

     

    It is sparsely mentioned in the Power BI API endpoint limitations section, but would appreciate a clear API response from the API itself:

     

    To use Service Principals, make sure the admin tenant setting Allow service principals to use Power BI APIs under Developer settings is enabled. However, regardless of the admin tenant setting, Service Principals aren't supported for datasets with RLS per RLS limitations or datasets with SSO enabled.