<?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 Re: Get-PowerBIActivityEvents returns empty nodes in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Get-PowerBIActivityEvents-returns-empty-nodes/m-p/3484786#M44998</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;According to your description, it seems that it only return empty json when call REST API to get&amp;nbsp;&lt;SPAN&gt;activitiy logs. Howevery, before it is working normally. Am I right? To troubleshoot this issue, please follow the steps below: &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. &lt;STRONG&gt;Check the PowerShell module version:&lt;/STRONG&gt; Ensure that you are using the latest version of the Power BI PowerShell module.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Update-Module -Name MicrosoftPowerBIMgmt&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;2. Verify the authentication:&lt;/STRONG&gt; Make sure that you are authenticated correctly to access the Power BI service.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/powershell/power-bi/overview?view=powerbi-ps" target="_blank"&gt;Power BI Cmdlets reference | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Connect-PowerBIServiceAccount   # or use aliases: Login-PowerBIServiceAccount, Login-PowerBI&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;3. Check the date range:&lt;/STRONG&gt; Verify that the date range you are specifying is correct and includes the desired activity logs. Double-check the start and end dates in your script.&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4. T&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;est with a single date:&lt;/STRONG&gt; To isolate the issue, try running the script with a single date instead of iterating over a range of dates. This will help determine if the issue is specific to the date range or if it persists even with a single date. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/powershell/module/microsoftpowerbimgmt.admin/get-powerbiactivityevent?view=powerbi-ps" target="_blank"&gt;Get-PowerBIActivityEvent (MicrosoftPowerBIMgmt.Admin) | Microsoft Learn&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Get-PowerBIActivityEvent -StartDateTime 2019-08-10T14:35:20 -EndDateTime 2019-08-10T18:25:50&lt;/LI-CODE&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2023 06:36:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-10-19T06:36:04Z</dc:date>
    <item>
      <title>Get-PowerBIActivityEvents returns empty nodes</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-PowerBIActivityEvents-returns-empty-nodes/m-p/3481061#M44964</link>
      <description>&lt;P&gt;Powershell script previously working to retrieve activitiy logs using Get-PowerBIActivityEvents cmdlet now returns a large but empty json&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanFlint_0-1697545703203.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/982190iC26CC3B9F1E01DBC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanFlint_0-1697545703203.png" alt="JonathanFlint_0-1697545703203.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;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N&gt;+&lt;/SPAN&gt;&lt;SPAN&gt;"T23:59:59.999Z"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;$Activity&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;Get-PowerBIActivityEvents&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;StartDateTime &lt;/SPAN&gt;&lt;SPAN&gt;$StartDate&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;EndDateTime &lt;/SPAN&gt;&lt;SPAN&gt;$EndDate&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;$Activity&lt;/SPAN&gt; &lt;SPAN&gt;|&lt;/SPAN&gt; &lt;SPAN&gt;Out-File&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;FilePath &lt;/SPAN&gt;&lt;SPAN&gt;$FileName&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;When doing an in-line Write-Host on $Activity it shows the same as the saved file. This script was working yesterday and last week when I first created this, has there been an update to the api? Can anyone see the bug here?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;* I am calling this under a foreach($i in (x..y) ) {} to iterate over a range of dates but its returning the same empty valueless json on all dates, 1 with ~100 nodes, 1 date returns only 2 nodes&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Oct 2023 12:33:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-PowerBIActivityEvents-returns-empty-nodes/m-p/3481061#M44964</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-17T12:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Get-PowerBIActivityEvents returns empty nodes</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-PowerBIActivityEvents-returns-empty-nodes/m-p/3484786#M44998</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;According to your description, it seems that it only return empty json when call REST API to get&amp;nbsp;&lt;SPAN&gt;activitiy logs. Howevery, before it is working normally. Am I right? To troubleshoot this issue, please follow the steps below: &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. &lt;STRONG&gt;Check the PowerShell module version:&lt;/STRONG&gt; Ensure that you are using the latest version of the Power BI PowerShell module.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Update-Module -Name MicrosoftPowerBIMgmt&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;2. Verify the authentication:&lt;/STRONG&gt; Make sure that you are authenticated correctly to access the Power BI service.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/powershell/power-bi/overview?view=powerbi-ps" target="_blank"&gt;Power BI Cmdlets reference | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Connect-PowerBIServiceAccount   # or use aliases: Login-PowerBIServiceAccount, Login-PowerBI&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;3. Check the date range:&lt;/STRONG&gt; Verify that the date range you are specifying is correct and includes the desired activity logs. Double-check the start and end dates in your script.&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4. T&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;est with a single date:&lt;/STRONG&gt; To isolate the issue, try running the script with a single date instead of iterating over a range of dates. This will help determine if the issue is specific to the date range or if it persists even with a single date. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/powershell/module/microsoftpowerbimgmt.admin/get-powerbiactivityevent?view=powerbi-ps" target="_blank"&gt;Get-PowerBIActivityEvent (MicrosoftPowerBIMgmt.Admin) | Microsoft Learn&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Get-PowerBIActivityEvent -StartDateTime 2019-08-10T14:35:20 -EndDateTime 2019-08-10T18:25:50&lt;/LI-CODE&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 06:36:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-PowerBIActivityEvents-returns-empty-nodes/m-p/3484786#M44998</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-19T06:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get-PowerBIActivityEvents returns empty nodes</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-PowerBIActivityEvents-returns-empty-nodes/m-p/3484963#M44999</link>
      <description>&lt;P&gt;After much trouble shooting the issue seemed to be with using vscode, when I switched to powershell ISE it worked fine. I'm assuming vscode and powershell ISE had some differences in versions of PS or the modules&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 07:47:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-PowerBIActivityEvents-returns-empty-nodes/m-p/3484963#M44999</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-19T07:47:01Z</dc:date>
    </item>
  </channel>
</rss>

