Forum Discussion
Connect by Powershell
Hi Anonymous ,
After you have successfully set up the service principal, please try the following script:
Import-Module MicrosoftPowerBIMgmt
Connect-PowerBIServiceAccount -Tenant xxxxx -ServicePrincipal -Credential (Get-Credential)
After enter, the following window will pop up, then enter your Application ID and client secret.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I have tried this, and once more received the same error message as per screenshot below. My expected result is to run the Connect-PowerBIServiceAccount command without any errors (at which point I'll proceed with the rest of my script).
- v-kkf-msft4 years agoCommunity Support
Hi Anonymous ,
Have you enabled the Power BI service admin settings? For an Azure AD app to be able to access the Power BI content and APIs, a Power BI admin needs to enable service principal access in the Power BI admin portal.
Add the security group you created in Azure AD, to the specific security group section in the Developer settings.
Embed Power BI content with service principal and an application secret
If this error still persists, please use fiddler to trace details error message about that powershell request, or see if these document are helpful
Best Regards,
Winniz