semantic-link-labs
semantic-link-labs copied to clipboard
Issue running sempy_labs.run_model_bpa_bulk in a notebook with the run notebook on demand API using with Azure DevOps
When trying to run sempy_labs.run_model_bpa_bulk in a notebook with the run notebook on demand API using with Azure DevOpsI get interesting issues.
If I run the notebook in the context of the service principal the notebook fails and I get the below error in the notebook logs: FabricHTTPException: 401 Unauthorized for url: https://api.powerbi.com/powerbi/globalservice/v201606/clusterdetails
When I try and run it as a Microsoft Entra user with MFA disabled the notebook starts to run and it looks like it has suceeded at first. But then I go into the notebook history and view th stdout I see the below error: 🔴 Model BPA failed for the 'blah blah' semantic model within the 'Something' workspace. MWC token validation failed: Invalid Token type, expected ServiceToken but got AadBasedToken
I have tried various methods of authenticating to resolve this. So far, the only way I have managed to get it working so far in Azure DevOps is to create a new variable for the bearer token. Then go into Edge Developer mode and get the interactive bearer token and add that as the variable.
Obviously this is not ideal, is there an alternative solution to resolve this?