Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.