Get-PowerBIActivityEvent Error : Attempted to access an element as a type incompatible with the array.

Nikunj Patel 61 Reputation points
2023-07-30T09:39:58.51+00:00

I am facing to powerBI activity using azure account automation runbook work. Successfully logging using Login-PowerBIServiceAccount is working correctly, but with these commands, Get-PowerBIActivityEvent, Get-PowerBIWorkspace I get the error:

Get-PowerBIActivityEvent : Attempted to access an element as a type incompatible with the array.

following version of powerbi module I used in azure automation account. Can someone help me how we can fix this?

$pbiAccount=Connect-PowerBIServiceAccount -TenantId $TenantId  -ServicePrincipal -Credential $Credential
    
    "Login with: $($pbiAccount.UserName)"

    Get-PowerBIActivityEvent  -StartDateTime '2023-07-26T05:00:00' -EndDateTime '2023-07-26T20:59:59'  -ResultType JsonString

User's image

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,366 questions
Windows for business Windows Server User experience PowerShell
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.