Closed bneelon85 closed 4 years ago
Hi,
I'm glad to hear that you came this far. I've seen this error a few times already over the last day, so luckily I know what is causing it and how to fix it!
The error is caused by the Power BI Privacy Levels settings and has nothing to do with the authentication. In order to fix this, we have to change some settings in Power BI Desktop.
Please follow these steps:
One other thing you might want to avoid and check, before Power BI starts asking if you want to execute every query. Again in the settings, go to security and uncheck the top setting, stating "Require user approval for new native database queries"
Hope this works for you :)
Cheers, Marc
@marclelijveld Thanks for the quick reply!
I applied those changes, but to no avail. One note, that you may have seen from my reply in another thread is that I'm running the PowerShell script via VS Code, external of the tool because of IT restrictions.
Does the script need to be initiated within the Power BI report to grab the proper $Server
and $DatabaseName
variables in the ps1 file? or will the script identify running instances of Power Bi Desktop?
If the former, is there a way to find and hard code those variable names for testing purposes? I know there are ways to unzip a .pbit file and check the DocumentModelSchema...
Thanks again!
Ok I am good. I found the server:port using Tabular Editor and this article: https://www.biinsight.com/four-different-ways-to-find-your-power-bi-desktop-local-port-number/
I substituted the $args[0]
with localhost:<portNumber>
that I got from Tabular Editor and ran the PowerShell manually, and it worked!
Hi,
I was not aware that you run it outside of Power BI. That is indeed why the refresh fails, as there will be no Server and DatabaseName pushed from Power BI into the JSON file. As you said, you can get it via different routes as well and manually add it to the json or directly in the PBIT file.
You can use it in the way you prefer :) At least, my intent was to use it from the External Tools ribbon.
Thanks, Marc
Trust me that was my intent too, but wasn't able to run it from External Tools(at least yet) due to IT PowerShell restrictions. For some reason, VS Code let me run the PowerShell script from there without issues...¯_(ツ)_/¯
Hi @marclelijveld ,
I am able to get all the way through the ModelDocumentationTemplate step in the process you outlined at https://data-marc.com/2020/07/28/external-tools-document-your-power-bi-model/
After that I get the Refresh Failed with a handful of errors resembling:
Tables - Query 'Tables' (step 'Renamed Columns1') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.
andLoading blocked by failures with other queries.
I have tried all the different authentication methods, but the one piece that looks different is instead of connecting to localhost it's trying to connect to MSOLAP.8 (see screenshot)
Does this tool need admin privileges to a SQL Server Database? Or should it be trying to connect to the Tabular Model running locally in the Power BI Desktop File?
Thanks for any help you can provide!