cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver III
Resolver III

Authenticate PowerBI in Azure Automate Powershell using cmdlets

Can anyone help me figure out how to authenticate my powerbi account in a powershell runbook so I can run PowerBI cmdlets?


I've tried many variations of this cmdlet:

Connect-PowerBIServiceAccount

with some built-in credentials. I'm driving myself crazy trying every variation I find on the web.
 
I honestly don't know where to start or why nothing is working.

Chris
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver III
Resolver III

Re: Authenticate PowerBI in Azure Automate Powershell using cmdlets

As a follow-up, I'm using the Powershell within Azure portal. I've been made aware that that powershell can't be updated and is currently on version 5. 

 

That's probably why I can't get anything to work on it.

View solution in original post

14 REPLIES 14
Highlighted
Resident Rockstar
Resident Rockstar

Re: Authenticate PowerBI in Azure Automate Powershell using cmdlets

Login-PowerBIServiceAccount

Highlighted
Resolver III
Resolver III

Re: Authenticate PowerBI in Azure Automate Powershell using cmdlets

@lbendlin Thanks for the reply. This is an iteration of what I've tried and have gotten the same result. Could you explain a little more? 

Highlighted
Resident Rockstar
Resident Rockstar

Re: Authenticate PowerBI in Azure Automate Powershell using cmdlets

That one works for me. Of course after that there's not much I can do since I am not a tenant admin.

Highlighted
Resolver III
Resolver III

Re: Authenticate PowerBI in Azure Automate Powershell using cmdlets

 

I get the error: "The runbook job was attempted 3 times, but it failed each time". Is it different if I'm using a runbook?

 
 
Highlighted
Resident Rockstar
Resident Rockstar

Re: Authenticate PowerBI in Azure Automate Powershell using cmdlets

Maybe.  Is your runbook running on Powershell Core 6 or better?

Highlighted
Resolver III
Resolver III

Re: Authenticate PowerBI in Azure Automate Powershell using cmdlets

How do I figure that out? I'm doing all of this through Azure Automate.

Highlighted
Resident Rockstar
Resident Rockstar

Re: Authenticate PowerBI in Azure Automate Powershell using cmdlets

$PSVersionTable.PSVersion

Highlighted
Resolver III
Resolver III

Re: Authenticate PowerBI in Azure Automate Powershell using cmdlets

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      15063  726   
Highlighted
Resident Rockstar
Resident Rockstar

Re: Authenticate PowerBI in Azure Automate Powershell using cmdlets

that's not enough. Can you upgrade to 6?

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors