Forum Discussion
KEMKEM
2 years agoRegular Visitor
How to get transactions by Power Bi Powershell module "MicrosoftPowerBIMgmt" programmatically?
I have a PowerShell script where I get all the transactions by using http request below.
'https://api.powerbi.com/v1.0/myorg/groups/' + $DataflowAPI.workspaceId[$i] + '/dataflows/' + $DataflowAPI.objectId[$i] + '/transactions
How can I get all the transactions by using the PowerShell module "MicrosoftPowerBIMgmt"
At this moment I have found only this part:
Connect-PowerBIServiceAccount
$results = Get-PowerBIDataflow -Scope Organization
2 Replies
- lbendlinSuper User
You can run standard REST API calls from PowerShell instead of using the PowerBIManagement convenience functions.
Dataflows - Get Dataflow Transactions - REST API (Power BI Power BI REST APIs) | Microsoft Learn
- KEMKEMRegular Visitor
@lbendlin thank you, as you see in my post I already using the Power Bi Rest Api as you described. I only hate the ugly refresh token which is needed for the authentication. I am looking for a solution where I can easy do the authentication with for example a service principal, managed identity or Azure app registration. The modern way. I know that is possible with Connect-PowerBIServiceAccount.