Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Connect-PowerBIServiceAccount : Failed to populate environments in settings

Hello all,

 

I have been running this command without any issue for more than a year: Connect-PowerBIServiceAccount.

Since yesterday, it keeps failing with the following error:

 

Connect-PowerBIServiceAccount : Failed to populate environments in settings.

FullyQualifiedErrorId : Failed to populate environments in settings,Microsoft.PowerBI.Commands.Profile.ConnectPowerBIServiceAccount

 

I am running it from Windows Powershell ISE. Please kindly assist.


Regards

Joe

  • Had the same error, although this is the first time i have setup it up.

     

    Found this thread which worked for me: https://community.powerbi.com/t5/Service/PowerShell-Login-to-Power-BI-Write-Error/m-p/1095055#M96357

     

    The short of it was to install each module individually (I think MicrosoftPowerBIMgmt.Profile was the key one):

    Install-Module -Name MicrosoftPowerBIMgmt.Admin
    Install-Module -Name MicrosoftPowerBIMgmt.Capacities
    Install-Module -Name MicrosoftPowerBIMgmt.Data
    Install-Module -Name MicrosoftPowerBIMgmt.Profile
    Install-Module -Name MicrosoftPowerBIMgmt.Reports
    Install-Module -Name MicrosoftPowerBIMgmt.Workspaces

     After doing that the command worked for me.

    Connect-PowerBIServiceAccount

    Hope this helps.

     

5 Replies

  • Had the same error, although this is the first time i have setup it up.

     

    Found this thread which worked for me: https://community.powerbi.com/t5/Service/PowerShell-Login-to-Power-BI-Write-Error/m-p/1095055#M96357

     

    The short of it was to install each module individually (I think MicrosoftPowerBIMgmt.Profile was the key one):

    Install-Module -Name MicrosoftPowerBIMgmt.Admin
    Install-Module -Name MicrosoftPowerBIMgmt.Capacities
    Install-Module -Name MicrosoftPowerBIMgmt.Data
    Install-Module -Name MicrosoftPowerBIMgmt.Profile
    Install-Module -Name MicrosoftPowerBIMgmt.Reports
    Install-Module -Name MicrosoftPowerBIMgmt.Workspaces

     After doing that the command worked for me.

    Connect-PowerBIServiceAccount

    Hope this helps.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you, Aaron. That was the fix! 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks so much Aaron.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous what's your OS and did you recently get this update? KB4569746. We're on Win2016 and are facing the same issue. Another team of ours are on Win2012 R2 and got a similar update KB4570508 and their script is still working.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi zzfaithlezz,

      We are on Windows Server 2012 R2. Last updates happened in 2017.

      Once Microsoft get back to you, please kindly share the recommendations to fix the issue.

       

      Regards

      Joe