<?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 Access PowerBI dataset model through powershell OleDbConnection in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Access-PowerBI-dataset-model-through-powershell-OleDbConnection/m-p/1608478#M27343</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to access the&amp;nbsp;PowerBI dataset model through powershell using OleDbConnection with the following code.&lt;/P&gt;&lt;P&gt;It is throwing an access issue error message but the same code was worked fine a few months back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H5&gt;&lt;FONT color="#0000FF"&gt;$connection = New-Object -TypeName System.Data.OleDb.OleDbConnection&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$connectionString = 'Provider=MSOLAP.8;Initial Catalog=sobe_xxx-xxxxx;Data Source=pbiazure://api.powerbi.com;MDX Compatibility=1;Safety Options=2;MDX Missing Member Mode=Error;Identity Provider=&lt;A href="https://login.microsoftonline.com/common" target="_blank" rel="noopener"&gt;https://login.microsoftonline.com/common&lt;/A&gt;, &lt;A href="https://analysis.windows.net/powerbi/api" target="_blank" rel="noopener"&gt;https://analysis.windows.net/powerbi/api&lt;/A&gt;, 929d0ec0-7a41-4b1e-xxxx-xxxx;Update Isolation Level=2'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$connection.ConnectionString = $connectionString&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$command = $connection.CreateCommand()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$command.CommandText = "SELECT [ID] AS [ModelID], [Name] AS [ModelName], [ModifiedTime] AS [ModelModifiedTime], [StructureModifiedTime] AS [ModelStructureModifiedTime], [Version] AS [ModelVersion] FROM $SYSTEM.TMSCHEMA_MODEL"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$Sourceadapter = New-Object -TypeName System.Data.OleDb.OleDbDataAdapter $command&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$dmvResultSet = New-Object -TypeName System.Data.DataTable&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$Sourceadapter.Fill($dmvResultSet)&lt;/FONT&gt;&lt;/H5&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Error :&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;Exception calling "Fill" with "1" argument(s): "User '&amp;lt;pii&amp;gt;72f988bf-86f1-41af-91ab-2d7cd011db47-xxxxxx&amp;lt;/pii&amp;gt;' needs to be an administrator to read the &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;metadata of the database 'f0fb13c2-ebd3-4135-ae5d-xxxxx'."&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me if you encountered the similar issues and have any solutions for it, it will be a great help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note: &lt;/STRONG&gt;Given the owner access to the workspace for the above user&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jan 2021 11:53:22 GMT</pubDate>
    <dc:creator>kprabha2020</dc:creator>
    <dc:date>2021-01-19T11:53:22Z</dc:date>
    <item>
      <title>Access PowerBI dataset model through powershell OleDbConnection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Access-PowerBI-dataset-model-through-powershell-OleDbConnection/m-p/1608478#M27343</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to access the&amp;nbsp;PowerBI dataset model through powershell using OleDbConnection with the following code.&lt;/P&gt;&lt;P&gt;It is throwing an access issue error message but the same code was worked fine a few months back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H5&gt;&lt;FONT color="#0000FF"&gt;$connection = New-Object -TypeName System.Data.OleDb.OleDbConnection&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$connectionString = 'Provider=MSOLAP.8;Initial Catalog=sobe_xxx-xxxxx;Data Source=pbiazure://api.powerbi.com;MDX Compatibility=1;Safety Options=2;MDX Missing Member Mode=Error;Identity Provider=&lt;A href="https://login.microsoftonline.com/common" target="_blank" rel="noopener"&gt;https://login.microsoftonline.com/common&lt;/A&gt;, &lt;A href="https://analysis.windows.net/powerbi/api" target="_blank" rel="noopener"&gt;https://analysis.windows.net/powerbi/api&lt;/A&gt;, 929d0ec0-7a41-4b1e-xxxx-xxxx;Update Isolation Level=2'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$connection.ConnectionString = $connectionString&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$command = $connection.CreateCommand()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$command.CommandText = "SELECT [ID] AS [ModelID], [Name] AS [ModelName], [ModifiedTime] AS [ModelModifiedTime], [StructureModifiedTime] AS [ModelStructureModifiedTime], [Version] AS [ModelVersion] FROM $SYSTEM.TMSCHEMA_MODEL"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$Sourceadapter = New-Object -TypeName System.Data.OleDb.OleDbDataAdapter $command&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$dmvResultSet = New-Object -TypeName System.Data.DataTable&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;$Sourceadapter.Fill($dmvResultSet)&lt;/FONT&gt;&lt;/H5&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Error :&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;Exception calling "Fill" with "1" argument(s): "User '&amp;lt;pii&amp;gt;72f988bf-86f1-41af-91ab-2d7cd011db47-xxxxxx&amp;lt;/pii&amp;gt;' needs to be an administrator to read the &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;metadata of the database 'f0fb13c2-ebd3-4135-ae5d-xxxxx'."&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me if you encountered the similar issues and have any solutions for it, it will be a great help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note: &lt;/STRONG&gt;Given the owner access to the workspace for the above user&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 11:53:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Access-PowerBI-dataset-model-through-powershell-OleDbConnection/m-p/1608478#M27343</guid>
      <dc:creator>kprabha2020</dc:creator>
      <dc:date>2021-01-19T11:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Access PowerBI dataset model through powershell OleDbConnection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Access-PowerBI-dataset-model-through-powershell-OleDbConnection/m-p/1613156#M27393</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/161887"&gt;@kprabha2020&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are your the Power BI administrator?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/admin/service-admin-administering-power-bi-in-your-organization " target="_self"&gt;What is Power BI administration&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Lionel Chen&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 06:10:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Access-PowerBI-dataset-model-through-powershell-OleDbConnection/m-p/1613156#M27393</guid>
      <dc:creator>v-lionel-msft</dc:creator>
      <dc:date>2021-01-21T06:10:06Z</dc:date>
    </item>
  </channel>
</rss>

