Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi All,
I'm attempting to login to Power BI through the PowerShell Power BI cmdlet.. I was able to install the cmdlet (Install-Module -Name MicrosoftPowerBIMgmt) however when trying to login I recieve a WriteError (shown below).. When using "Connect-PowerBIServiceAccount" or "Login-PowerBI" the login screen for my organization comes up and I login using my credentials.. Howver then PowerShell returns the WriteError.
Since the image is kinda hard to read here is the error:
Login-PowerBIServiceAccount : One or more errors occurred.
At line:1 char:1
+ Login-PowerBIServiceAccount
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...IServiceAccount:ConnectPowerBIServiceAccount) [Connect-PowerBIServiceAccount], AggregateException
+ FullyQualifiedErrorId : One or more errors occurred.,Microsoft.PowerBI.Commands.Profile.ConnectPowerBIServiceAccount
--
It seems most of the WriteErrors in similar posts occured in steps subsequent to logging in.
I do have a Pro license and Premium capacity available if that's also relevant. I'm attempting to return the access token for Power BI Embedded using PowerShell as described here.
I'm a PowerShell novice so I appreicate any guidance.
Thanks!
Solved! Go to Solution.
Hi @Anonymous ,
I can't reproduce your issue.
1. Please check.
Supported environments and PowerShell versions:
2. Install Profile module for Power BI Cmdlets.
Install-Module -Name MicrosoftPowerBIMgmt.Profile
3. Run as Administrator and try to login to Power BI.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Team,
Can you advise if "Connect - Power BI account" cmdlet while used with service principal will still ask for MFA prompt ? We are trying to setup a mechanism where we want to keep MFA enabled for org security, but figure a way to automate fetching Power BI logs through this account. Please let me know how can this be setup.
That seemed to work! I was able to retrieve the embed token.
I did run into a snag when then trying that embed token in the Microsoft Power BI Embedded Playground for whatever the reason when trying to run using one of my own reports it wouldn't render at all in the embed view in the lower part of the page.
The steps being:
-Switch to AAD token
-Paste embed token from PowerShell
-Paste Embed URL (from report)
-Past Report ID
-Hit Run
From there no results, not even anything showing up on the log on the right of that screen.
Does the report need to be registered in Azure as an app first? Which I also tried and didn't have anymore luck.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
22 | |
17 | |
10 | |
9 | |
8 |
User | Count |
---|---|
40 | |
28 | |
18 | |
17 | |
15 |