cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
arnoc Frequent Visitor
Frequent Visitor

Problems creating (Azure) Analysis Services Live Connection Dataset via PowerBI REST API

Hi,

 

I've been trying to create a Live Connection dataset pointing to Azure Analysis Services via the REST API's:
Push Datasets - Datasets PostDatasetInGroup

 

First off, it's really nice to be able to test the API calls directly from the documentation page, but ...

It would be nice to have some more info on the Analysis Services options, as this is pretty much undocumented - as noted by @tpaz here.

 

So far I've come to conclude that:

  •  The correct default mode might be either one of the below, as per the this post by @jpp , unfortanely the msdn-article referenced by JP is no longer available.
    "defaultMode": "AsAzure"
    or 
    "defaultMode": "AsOnPrem"
    If this is supposed to be 'AsOnPrem' even for  AAS, does that mean that a gateway is also required? Also from according to Adam (@GuyInACubehere the different defaultModes should have an impact on how you authenticate?
  • The tables element should be an empty array  '[]'.
  •  AAS live connection requires a 'connectionString' instead of the connection details, as well as a name and potentially 'datasourceType'.
  • The ConnectionString should include at least the elements 'Data Source','Initial Catalog', and 'Cube'.
    "connectionString": "Data Source=asazure://<region>.asazure.windows.net/<your instance>;Initial Catalog=<your database>;Cube=Model"
  •  If the datasourceType is required, it should as far I can tell be 
    "datasourceType": "AnalysisServices"

 

I've tried the following requests resulting in 401 responses:

 

{
  "name": "ApiTestAasDataset1",
  "isRefreshable": false,
  "isEffectiveIdentityRequired": true,
  "isEffectiveIdentityRolesRequired": false,
  "isOnPremGatewayRequired": false,
  "datasources": [
  	{
      "datasourceType": "AnalysisServices",
      "connectionDetails": {
        "server": "asazure://westeurope.asazure.windows.net/<myserver>:rw",
        "database": "<mydb>"
      },
      "connectionString": "Data Source=asazure://westeurope.asazure.windows.net/<myserver>;Initial Catalog=<mydb>;Cube=Model;User ID=<myuserid>;Persist Security Info=True;Impersonation Level=Impersonate"
  	}
  	],
"tables": [] "defaultMode": "AsAzure" }
{
  "name": "ApiTestAasDataset1",
  "datasources": [
  	{
      "datasourceType": "AnalysisServices",
      "connectionString": "Data Source=asazure://westeurope.asazure.windows.net/<myserver>;Initial Catalog=<mydb>;Cube=Model;User ID=<myuserid>;Persist Security Info=True;Impersonation Level=Impersonate"
  	}
  	],
  "tables": [],
  "defaultMode": "AsAzure"
}

 

Anyhow, I hope that at least this post helps other people struggling with this to get stuck at the same point I am... because a burden shared is a burden halved? Smiley Very Happy Also if we do get this figured out this thread could serve as rudimentary documentation in lieu of official examples from Microsoft.

 

EDIT: This should probably have gone into the Developer section, my bad for not looking at the forum structure closely enough. If any moderators see this and have the ability to move the post, then feel free to do so.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors