microsoft / microsoft/powerbi-powershell
Connect-PowerBIServiceAccount -Credential $Credential fails from Azure Automation Account
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 413
- Forks
- 134
- Avg merge
- 33m
- Merged PRs (30d)
- 1
Description
I'm trying to use MicrosoftPowerBIMgmt.Admin and MicrosoftPowerBIMgmt.Profile with Azure Automation Account to get Power BI audit logs and push them to a Storage Account with Az.Accounts nad Az.Storage.
I've created a user that has:
- Disabled password expiration
- Excluded from MFA
- RBAC contributor directly on the storage account
- Power BI Administrator in Azure AD
Problem is the Connect-PowerBIServiceAccount cmdlet.
From PowerShell ISE
When running $null = Connect-PowerBIServiceAccount -Credential $Credential from my machine, a black terminal pops up and disappears, and I get connected.

Modules

From Azure Automation Account
When running that from Automation Account with the same credential fetched from Automation Account Credentials, it causes the script to restart.

Modules


Q
How can we silently log in with a Azure AD user in a way that will work also from a Automation Account?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing Connect-PowerBIServiceAccount -Credential $Credential in Azure Automation and compare it with the PowerShell ISE behavior and the listed MicrosoftPowerBIMgmt and Az modules. Done means identifying a supported silent sign-in path that runs without restarting the Automation script and allows the audit-log workflow to continue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell
- Domain
- authentication, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100