<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problems creating (Azure) Analysis Services Live Connection Dataset via PowerBI REST API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Problems-creating-Azure-Analysis-Services-Live-Connection/m-p/800767#M20890</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been trying to create a Live Connection dataset pointing to Azure Analysis Services via the REST API's:&lt;BR /&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets/datasets_postdatasetingroup" target="_blank" rel="noopener"&gt;Push Datasets - Datasets PostDatasetInGroup&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First off, it's really nice to be able to test the API calls directly from the documentation page, but ...&lt;/P&gt;&lt;P&gt;It would be nice to have some more info on the Analysis Services options, as this is pretty much undocumented - as noted by&amp;nbsp;@Anonymous&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Developer/Problems-on-creating-a-new-dataset-with-Power-BI-s-REST-API/m-p/596515#M18154" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far I've come to conclude that:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;The correct default mode might be either one of the below, as per the&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Developer/Rest-API-error-creating-datasets-for-AzureAS/m-p/323825#M9556" target="_blank" rel="noopener"&gt;this post&lt;/A&gt; by&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/3821" target="_blank" rel="noopener"&gt;@jpp&lt;/A&gt; , unfortanely the msdn-article referenced by JP is no longer available.&lt;PRE&gt;"defaultMode": "AsAzure"
or 
"defaultMode": "AsOnPrem"&lt;/PRE&gt;&lt;I&gt;If this &lt;U&gt;is&lt;/U&gt; supposed to be 'AsOnPrem' even for&amp;nbsp; AAS, does that mean that a gateway is also required? Also from according to &lt;/I&gt;&lt;EM&gt;Adam (&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/91"&gt;@GuyInACube&lt;/a&gt; )&amp;nbsp;&lt;A href="https://youtu.be/GPf0YS-Xbyo?t=559" target="_self"&gt;here&lt;/A&gt; the different defaultModes should have an impact on how you authenticate?&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;The tables element should be an empty array&amp;nbsp; '[]'.&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;AAS live connection requires a 'connectionString' instead of the connection details, as well as a name and potentially 'datasourceType'.&lt;/LI&gt;&lt;LI&gt;The ConnectionString should include &lt;FONT color="#3366ff"&gt;at least&lt;/FONT&gt; the elements 'Data Source','Initial Catalog', and 'Cube'.&lt;PRE&gt;"connectionString": "Data Source=asazure://&amp;lt;region&amp;gt;.asazure.windows.net/&amp;lt;your instance&amp;gt;;Initial Catalog=&amp;lt;your database&amp;gt;;Cube=Model"&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;If the datasourceType is required, it should as far I can tell be&amp;nbsp;&lt;PRE&gt;"datasourceType": "AnalysisServices"&lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried the following requests resulting in 401 responses:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "name": "ApiTestAasDataset1",
  "isRefreshable": false,
  "isEffectiveIdentityRequired": true,
  "isEffectiveIdentityRolesRequired": false,
  "isOnPremGatewayRequired": false,
  "datasources": [
  	{
      "datasourceType": "AnalysisServices",
      "connectionDetails": {
        "server": "asazure://westeurope.asazure.windows.net/&amp;lt;myserver&amp;gt;:rw",
        "database": "&amp;lt;mydb&amp;gt;"
      },
      "connectionString": "Data Source=asazure://westeurope.asazure.windows.net/&amp;lt;myserver&amp;gt;;Initial Catalog=&amp;lt;mydb&amp;gt;;Cube=Model;User ID=&amp;lt;myuserid&amp;gt;;Persist Security Info=True;Impersonation Level=Impersonate"
  	}
  	],&lt;BR /&gt;  "tables": []
  "defaultMode": "AsAzure"
}

&lt;/PRE&gt;&lt;PRE&gt;{
  "name": "ApiTestAasDataset1",
  "datasources": [
  	{
      "datasourceType": "AnalysisServices",
      "connectionString": "Data Source=asazure://westeurope.asazure.windows.net/&amp;lt;myserver&amp;gt;;Initial Catalog=&amp;lt;mydb&amp;gt;;Cube=Model;User ID=&amp;lt;myuserid&amp;gt;;Persist Security Info=True;Impersonation Level=Impersonate"
  	}
  	],
  "tables": [],
  "defaultMode": "AsAzure"
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&amp;nbsp;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://community.fabric.microsoft.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt; Also if we do get this figured out this thread could serve as rudimentary documentation in lieu of official examples from Microsoft.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Sep 2019 21:00:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-09-24T21:00:01Z</dc:date>
    <item>
      <title>Problems creating (Azure) Analysis Services Live Connection Dataset via PowerBI REST API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problems-creating-Azure-Analysis-Services-Live-Connection/m-p/800767#M20890</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been trying to create a Live Connection dataset pointing to Azure Analysis Services via the REST API's:&lt;BR /&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets/datasets_postdatasetingroup" target="_blank" rel="noopener"&gt;Push Datasets - Datasets PostDatasetInGroup&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First off, it's really nice to be able to test the API calls directly from the documentation page, but ...&lt;/P&gt;&lt;P&gt;It would be nice to have some more info on the Analysis Services options, as this is pretty much undocumented - as noted by&amp;nbsp;@Anonymous&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Developer/Problems-on-creating-a-new-dataset-with-Power-BI-s-REST-API/m-p/596515#M18154" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far I've come to conclude that:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;The correct default mode might be either one of the below, as per the&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Developer/Rest-API-error-creating-datasets-for-AzureAS/m-p/323825#M9556" target="_blank" rel="noopener"&gt;this post&lt;/A&gt; by&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/3821" target="_blank" rel="noopener"&gt;@jpp&lt;/A&gt; , unfortanely the msdn-article referenced by JP is no longer available.&lt;PRE&gt;"defaultMode": "AsAzure"
or 
"defaultMode": "AsOnPrem"&lt;/PRE&gt;&lt;I&gt;If this &lt;U&gt;is&lt;/U&gt; supposed to be 'AsOnPrem' even for&amp;nbsp; AAS, does that mean that a gateway is also required? Also from according to &lt;/I&gt;&lt;EM&gt;Adam (&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/91"&gt;@GuyInACube&lt;/a&gt; )&amp;nbsp;&lt;A href="https://youtu.be/GPf0YS-Xbyo?t=559" target="_self"&gt;here&lt;/A&gt; the different defaultModes should have an impact on how you authenticate?&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;The tables element should be an empty array&amp;nbsp; '[]'.&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;AAS live connection requires a 'connectionString' instead of the connection details, as well as a name and potentially 'datasourceType'.&lt;/LI&gt;&lt;LI&gt;The ConnectionString should include &lt;FONT color="#3366ff"&gt;at least&lt;/FONT&gt; the elements 'Data Source','Initial Catalog', and 'Cube'.&lt;PRE&gt;"connectionString": "Data Source=asazure://&amp;lt;region&amp;gt;.asazure.windows.net/&amp;lt;your instance&amp;gt;;Initial Catalog=&amp;lt;your database&amp;gt;;Cube=Model"&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;If the datasourceType is required, it should as far I can tell be&amp;nbsp;&lt;PRE&gt;"datasourceType": "AnalysisServices"&lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried the following requests resulting in 401 responses:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "name": "ApiTestAasDataset1",
  "isRefreshable": false,
  "isEffectiveIdentityRequired": true,
  "isEffectiveIdentityRolesRequired": false,
  "isOnPremGatewayRequired": false,
  "datasources": [
  	{
      "datasourceType": "AnalysisServices",
      "connectionDetails": {
        "server": "asazure://westeurope.asazure.windows.net/&amp;lt;myserver&amp;gt;:rw",
        "database": "&amp;lt;mydb&amp;gt;"
      },
      "connectionString": "Data Source=asazure://westeurope.asazure.windows.net/&amp;lt;myserver&amp;gt;;Initial Catalog=&amp;lt;mydb&amp;gt;;Cube=Model;User ID=&amp;lt;myuserid&amp;gt;;Persist Security Info=True;Impersonation Level=Impersonate"
  	}
  	],&lt;BR /&gt;  "tables": []
  "defaultMode": "AsAzure"
}

&lt;/PRE&gt;&lt;PRE&gt;{
  "name": "ApiTestAasDataset1",
  "datasources": [
  	{
      "datasourceType": "AnalysisServices",
      "connectionString": "Data Source=asazure://westeurope.asazure.windows.net/&amp;lt;myserver&amp;gt;;Initial Catalog=&amp;lt;mydb&amp;gt;;Cube=Model;User ID=&amp;lt;myuserid&amp;gt;;Persist Security Info=True;Impersonation Level=Impersonate"
  	}
  	],
  "tables": [],
  "defaultMode": "AsAzure"
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&amp;nbsp;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://community.fabric.microsoft.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt; Also if we do get this figured out this thread could serve as rudimentary documentation in lieu of official examples from Microsoft.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 21:00:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problems-creating-Azure-Analysis-Services-Live-Connection/m-p/800767#M20890</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-24T21:00:01Z</dc:date>
    </item>
  </channel>
</rss>

