<?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 PowerBi cmdlets for Powershell - Error Acquiring Token in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/PowerBi-cmdlets-for-Powershell-Error-Acquiring-Token/m-p/2539171#M36329</link>
    <description>&lt;P&gt;Hi all,&lt;BR /&gt;I would like to execute some basic commands using PowerBi cmdlets for Powershell. I have installed these modules on PowerShell:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MicrosoftPowerBIMgmt&lt;BR /&gt;MicrosoftPowerBIMgmt.Admin&lt;BR /&gt;MicrosoftPowerBIMgmt.Capacities&lt;BR /&gt;MicrosoftPowerBIMgmt.Data&lt;BR /&gt;MicrosoftPowerBIMgmt.Profile&lt;BR /&gt;MicrosoftPowerBIMgmt.Reports&lt;BR /&gt;MicrosoftPowerBIMgmt.Workspaces&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using "Connect-PowerBIServiceAccount" the login screen for my organization comes up and I login correctly using my credentials.&lt;/P&gt;&lt;P&gt;Once the connection is established i need to execute these simple calls: "Get-PowerBIWorkspace" and "Get-PowerBIReport" but I get this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Message : Error Acquiring Token:&lt;BR /&gt;The WriteObject and WriteError methods cannot be called from outside the overrides of the BeginProcessing, ProcessRecord, and EndProcessing methods, and&lt;BR /&gt;they can only be called from within the same thread. Validate that the cmdlet makes these calls correctly, or contact Microsoft Customer Support Services.&lt;BR /&gt;StackTrace : in Microsoft.PowerBI.Common.Authentication.WindowsAuthenticationFactory.&amp;lt;HandleAuthentication&amp;gt;d__3.MoveNext()&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;in Microsoft.PowerBI.Common.Authentication.WindowsAuthenticationFactory.&amp;lt;Authenticate&amp;gt;d__1.MoveNext()&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;in Microsoft.PowerBI.Commands.Common.AuthenticationFactorySelector.&amp;lt;Authenticate&amp;gt;d__5.MoveNext()&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;in Microsoft.PowerBI.Commands.Common.AuthenticationFactorySelector.&amp;lt;Authenticate&amp;gt;d__7.MoveNext()&lt;BR /&gt;Exception : System.Security.Authentication.AuthenticationException&lt;BR /&gt;InvocationInfo : {Get-PowerBIWorkspace}&lt;BR /&gt;Line : Get-PowerBIWorkspace&lt;BR /&gt;Position : line:1 char:1&lt;BR /&gt;+ Get-PowerBIWorkspace&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;HistoryId : 7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have full permissions in Azure Active Directory and PowerBi Service Account. Please any ideas how to solve this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Wed, 25 May 2022 14:06:12 GMT</pubDate>
    <dc:creator>Andrea_CS</dc:creator>
    <dc:date>2022-05-25T14:06:12Z</dc:date>
    <item>
      <title>PowerBi cmdlets for Powershell - Error Acquiring Token</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBi-cmdlets-for-Powershell-Error-Acquiring-Token/m-p/2539171#M36329</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;I would like to execute some basic commands using PowerBi cmdlets for Powershell. I have installed these modules on PowerShell:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MicrosoftPowerBIMgmt&lt;BR /&gt;MicrosoftPowerBIMgmt.Admin&lt;BR /&gt;MicrosoftPowerBIMgmt.Capacities&lt;BR /&gt;MicrosoftPowerBIMgmt.Data&lt;BR /&gt;MicrosoftPowerBIMgmt.Profile&lt;BR /&gt;MicrosoftPowerBIMgmt.Reports&lt;BR /&gt;MicrosoftPowerBIMgmt.Workspaces&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using "Connect-PowerBIServiceAccount" the login screen for my organization comes up and I login correctly using my credentials.&lt;/P&gt;&lt;P&gt;Once the connection is established i need to execute these simple calls: "Get-PowerBIWorkspace" and "Get-PowerBIReport" but I get this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Message : Error Acquiring Token:&lt;BR /&gt;The WriteObject and WriteError methods cannot be called from outside the overrides of the BeginProcessing, ProcessRecord, and EndProcessing methods, and&lt;BR /&gt;they can only be called from within the same thread. Validate that the cmdlet makes these calls correctly, or contact Microsoft Customer Support Services.&lt;BR /&gt;StackTrace : in Microsoft.PowerBI.Common.Authentication.WindowsAuthenticationFactory.&amp;lt;HandleAuthentication&amp;gt;d__3.MoveNext()&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;in Microsoft.PowerBI.Common.Authentication.WindowsAuthenticationFactory.&amp;lt;Authenticate&amp;gt;d__1.MoveNext()&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;in Microsoft.PowerBI.Commands.Common.AuthenticationFactorySelector.&amp;lt;Authenticate&amp;gt;d__5.MoveNext()&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;in Microsoft.PowerBI.Commands.Common.AuthenticationFactorySelector.&amp;lt;Authenticate&amp;gt;d__7.MoveNext()&lt;BR /&gt;Exception : System.Security.Authentication.AuthenticationException&lt;BR /&gt;InvocationInfo : {Get-PowerBIWorkspace}&lt;BR /&gt;Line : Get-PowerBIWorkspace&lt;BR /&gt;Position : line:1 char:1&lt;BR /&gt;+ Get-PowerBIWorkspace&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;HistoryId : 7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have full permissions in Azure Active Directory and PowerBi Service Account. Please any ideas how to solve this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 14:06:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBi-cmdlets-for-Powershell-Error-Acquiring-Token/m-p/2539171#M36329</guid>
      <dc:creator>Andrea_CS</dc:creator>
      <dc:date>2022-05-25T14:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBi cmdlets for Powershell - Error Acquiring Token</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBi-cmdlets-for-Powershell-Error-Acquiring-Token/m-p/2547271#M36410</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/393507"&gt;@Andrea_CS&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check your environments and PowerShell versions.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Windows PowerShell v3.0 and up with .NET 4.7.1 or above.&lt;/LI&gt;
&lt;LI&gt;PowerShell Core (v6) and up on any OS platform supported by PowerShell Core.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;For reference:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/powershell/power-bi/overview?view=powerbi-ps" target="_self"&gt;Microsoft Power BI Cmdlets for Windows PowerShell and PowerShell Core&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 09:02:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBi-cmdlets-for-Powershell-Error-Acquiring-Token/m-p/2547271#M36410</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-30T09:02:40Z</dc:date>
    </item>
  </channel>
</rss>

