Skip to content

Instantly share code, notes, and snippets.

@Fabian-Schmidt
Last active July 23, 2022 20:13
Show Gist options
  • Save Fabian-Schmidt/2e3d33b4b68f66f78e887c8cb2b0ebb6 to your computer and use it in GitHub Desktop.
Save Fabian-Schmidt/2e3d33b4b68f66f78e887c8cb2b0ebb6 to your computer and use it in GitHub Desktop.
Power BI Connectionstring to dataset without premium. Works with Free tier.
Use `Microsoft.AnalysisServices.AdomdClient.AdomdConnection`
`Data Source=pbiazure://analysis.windows.net:443/powerbi/api;Initial Catalog=<VirtualServerName>-<DatasetId>;Location="<PowerBIClusterUrl>/xmla?vs=<VirtualServerName>&db=<DatasetId>";Password="<PowerBIAccessToken>";Provider=PBIDATASET`
VirtualServerName = `sobe_wowvirtualserver` or `sobe_onpremisevirtualserver`
PowerBIClusterUrl = e.g. `https://wabi-west-europe-d-primary-redirect.analysis.windows.net` and see JS variable in PowerBI portal.
DatasetId = See URL in PowerBI portal when looking at dataset options.
PowerBIAccessToken = Example see JS variable in PowerBI portal.
When using SSMS `Initial Catalog` is optional.
@dharmsen
Copy link

Hi, thanks for this solution! However, I run into an error when running this in powershell: "The connection either timed out or was lost."
Do you have any clue why this error gets thrown?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment