Forum Discussion
Connecting PowerBI from Power Shell without prompting
I created a certificate thumbprint and passed with other parameters. But I encountered the below error. Is there any specific order for passing the parameters.
Command:
Connect-PowerBIServiceAccount -ServicePrincipal -CertificateThumbprint xxxxxxxxxxx -ApplicationId xxxxxxxxxxx -Credential $credential -TenantId xxxxxxxxxxxxxx
=====================================================
Error:
Connect-PowerBIServiceAccount : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1
+ Connect-PowerBIServiceAccount -ServicePrincipal -CertificateThumbprin ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Connect-PowerBIServiceAccount], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.PowerBI.Commands.Profile.ConnectPowerBIServiceAccount
You don't need the -Credential part. That's only if you're using the Application Secret approach. For me I had the following: Connect-PowerBIServiceAccount -ServicePrincipal -CertificateThumbprint XXXXXXXXX -ApplicationId XXXXXX -Tenant XXXXXXXX