Forum Discussion

krish89's avatar
krish89
Copper Contributor
Jul 21, 2020

Can't connect to PowerBI service account

Hello,

 

I have installed "MicrosoftPowerBIMgmt" module and I am trying to run the "Connect-PowerBIServiceAccount" command but getting the error.

 

Connect-PowerBIServiceAccount : One or more errors occurred.
At line:1 char:1
+ Connect-PowerBIServiceAccount
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], AggregateException
+ FullyQualifiedErrorId : System.AggregateException 

 

Any help would be appreciated.

 

Regards,

Krishna

    • sganti's avatar
      sganti
      Copper Contributor

      krish89 RohGoy Jasper_Baert1 julmoser stuPro finally found a solution to this issue.

      So every time you open the powershell and before running your powerBI powershell script/commands, run the following command:

      [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

      • bVenkatasubbareddy's avatar
        bVenkatasubbareddy
        Copper Contributor

        Dear Experts,

        I am new to powershell script and running below small script and getting the below error.


        Import-Module MicrosoftPowerBIMgmt
        Import-Module MicrosoftPowerBIMgmt.Profile

        $password = "mypwd" | ConvertTo-SecureString -asPlainText -Force
        $username = "email address removed for privacy reasons"
        $credential = New-Object System.Management.Automation.PSCredential($username, $password)

        Connect-PowerBIServiceAccount -Credential $credential

         

         Note: my userid is working but service account is not working.

        Please help me to resolve the issue and thank you in advanced.

         

  • stuPro's avatar
    stuPro
    Copper Contributor

    Any Luck? I'm receiving this error as well on a script that used to work krish89 

  • julmoser's avatar
    julmoser
    Copper Contributor

    same issue here.

    The script has been working just fine 3 days ago and now I started to receive this error.

    krish89  Are you using an AAD account to login or a Service Principal?

  • RohGoy's avatar
    RohGoy
    Copper Contributor

    krish89 did you find solution, I am having the same issue.

    My script was running fine earlier, suddenly started having issue.

     

    Thanks

Resources