Forum Discussion
(PowerShell) Connect-PowerBIServiceAccount not working
- 4 years ago
Problem found and solved!
It turned out that an update to the PowerShell extension for VS Code set this value "powershell.useX86Host": true. In other words, it started running 32 bit as default. Manually changing it back to x64 like shown in the screenshots belov solved the problem:
Cheers, Mike
Exactly my thought. We use Microsofts official PowerBi management package, so I think the best thing to do is open a ticket with their support.
I uninstalled the powershell module and reinstalled it again to update to the latest version.
I now receive a different error:
Login-PowerBI -Credential $credential
Login-PowerBI : One or more errors occurred.
At line:1 char:5
+ Login-PowerBI -Credential $credential
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...IServiceAccount:ConnectPowerBIServiceAccount) [Connect-PowerBIServiceAccount], AggregateException
+ FullyQualifiedErrorId : One or more errors occurred.,Microsoft.PowerBI.Commands.Profile.ConnectPowerBIServiceAccount
WARNING: (False) MSAL 4.25.0.0 MSAL.Desktop Microsoft Windows NT 10.0.19042.0 [08/26/2021 08:30:16 - a8595795-2a3c-4957-a9c1-289ad9698d27] Request retry failed.
WARNING: (False) MSAL 4.25.0.0 MSAL.Desktop Microsoft Windows NT 10.0.19042.0 [08/26/2021 08:30:16 - a8595795-2a3c-4957-a9c1-289ad9698d27] Exception type: Microsoft.Identity.Client.MsalUiRequ
iredException
, ErrorCode: invalid_grant
HTTP StatusCode 400
CorrelationId a8595795-2a3c-4957-a9c1-289ad9698d27
WARNING: (False) MSAL 4.25.0.0 MSAL.Desktop Microsoft Windows NT 10.0.19042.0 [08/26/2021 08:30:16 - a8595795-2a3c-4957-a9c1-289ad9698d27] Exception type: Microsoft.Identity.Client.MsalUiRequ
iredException
, ErrorCode: invalid_grant
HTTP StatusCode 400
CorrelationId a8595795-2a3c-4957-a9c1-289ad9698d27
at Microsoft.Identity.Client.OAuth2.OAuth2Client.ThrowServerException(HttpResponse response, RequestContext requestContext)
at Microsoft.Identity.Client.OAuth2.OAuth2Client.CreateResponse[T](HttpResponse response, RequestContext requestContext)
at Microsoft.Identity.Client.OAuth2.OAuth2Client.<ExecuteRequestAsync>d__11`1.MoveNext()