Forum Discussion
Executing a DAX query from .NET using new REST API
I'm working with Microsoft support to get some insight into this issue. Here's a summary of where the problem is today.
This project is a library for a Unity3d application, and the MFA popups are not supported. When the MFA popup code is reached, when hosted by Unity, the application hangs and no login windows are presented. I’ve also tried to get an authentication token by embedding my personal username/password, but that is failing with MsalUiRequiredException: AADSTS50076.
I’ve also tried ClientID and Secret – this returns a token successfully, and this would be my preferred solution, but the DAX query fails with a 403 http error when using this token.
The absolute problem that I’m running into is that I’m trying to take advantage of the new REST API support for DAX Queries in PowerBI.com, which is in public preview right now.
To summarize:
- Querying the REST API with a token acquired via MFA works fantastically, but I can’t use MFA in Unity3d.
- Querying the REST API with a token acquired via client/secret fails with a 403.
- Attempting to get a token with an embedded application username and password fails to return a token due to MsalUiRequiredException: AADSTS50076.
These results hold true for datasets hosted in:
- The old team-based Workspaces
- v2 Workspaces
- My Workspace
The App Registration from AAD (the service principal) has admin access in my v2 Workspace, so it should have permission to execute Build commands. I believe that Build permission and v2 Workspaces are a requirement for this feature.
I'm open to alternative solutions to querying the dataset, but I believe XMLA is off the table because I don't have a premium Power BI account.