<?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 PowerShell REST APIs and cmdlets - sometimes get duplicate results in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/PowerShell-REST-APIs-and-cmdlets-sometimes-get-duplicate-results/m-p/649606#M18875</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've just started using PowerShell and the REST APIs / cmdlets to pull Power BI data...and I'm finding cases where a command returns duplicate records. For example, if I run the following commands (where $workspace.Id is the value for a given workspace):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Lucida Console" size="1"&gt;Connect-PowerBIServiceAccount&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Lucida Console" size="1"&gt;Get-PowerBIDataset&lt;/FONT&gt; &lt;FONT color="#000080" face="Lucida Console" size="1"&gt;-Scope&lt;/FONT&gt; &lt;FONT color="#8a2be2" face="Lucida Console" size="1"&gt;Organization&lt;/FONT&gt; &lt;FONT color="#000080" face="Lucida Console" size="1"&gt;-WorkspaceId&lt;/FONT&gt; &lt;FONT color="#ff4500" face="Lucida Console" size="1"&gt;$workspace&lt;/FONT&gt;&lt;FONT color="#a9a9a9" face="Lucida Console" size="1"&gt;.&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1"&gt;Id&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I sometimes see the same dataset listed twice. Every attribute on both listing is exactly the same including the Dataset ID...and I don't see two datasets with the same names when looking through the Power BI service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know why I might be getting duplicates? It's not just on datasets, I think I've seen this behavior on other types of objects as well. This is making some of the PowerShell scripting more complicated (especially as I know very little Powershell...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2019 16:56:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-03-20T16:56:47Z</dc:date>
    <item>
      <title>PowerShell REST APIs and cmdlets - sometimes get duplicate results</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerShell-REST-APIs-and-cmdlets-sometimes-get-duplicate-results/m-p/649606#M18875</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've just started using PowerShell and the REST APIs / cmdlets to pull Power BI data...and I'm finding cases where a command returns duplicate records. For example, if I run the following commands (where $workspace.Id is the value for a given workspace):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Lucida Console" size="1"&gt;Connect-PowerBIServiceAccount&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Lucida Console" size="1"&gt;Get-PowerBIDataset&lt;/FONT&gt; &lt;FONT color="#000080" face="Lucida Console" size="1"&gt;-Scope&lt;/FONT&gt; &lt;FONT color="#8a2be2" face="Lucida Console" size="1"&gt;Organization&lt;/FONT&gt; &lt;FONT color="#000080" face="Lucida Console" size="1"&gt;-WorkspaceId&lt;/FONT&gt; &lt;FONT color="#ff4500" face="Lucida Console" size="1"&gt;$workspace&lt;/FONT&gt;&lt;FONT color="#a9a9a9" face="Lucida Console" size="1"&gt;.&lt;/FONT&gt;&lt;FONT face="Lucida Console" size="1"&gt;Id&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I sometimes see the same dataset listed twice. Every attribute on both listing is exactly the same including the Dataset ID...and I don't see two datasets with the same names when looking through the Power BI service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know why I might be getting duplicates? It's not just on datasets, I think I've seen this behavior on other types of objects as well. This is making some of the PowerShell scripting more complicated (especially as I know very little Powershell...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 16:56:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerShell-REST-APIs-and-cmdlets-sometimes-get-duplicate-results/m-p/649606#M18875</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-20T16:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell REST APIs and cmdlets - sometimes get duplicate results</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerShell-REST-APIs-and-cmdlets-sometimes-get-duplicate-results/m-p/675783#M19188</link>
      <description>&lt;P&gt;I am having same issue , how to filter and get only 1?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 14:10:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerShell-REST-APIs-and-cmdlets-sometimes-get-duplicate-results/m-p/675783#M19188</guid>
      <dc:creator>dpombal</dc:creator>
      <dc:date>2019-04-23T14:10:17Z</dc:date>
    </item>
  </channel>
</rss>

