Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Error : Attempted to access an element as a type incompatible with the array

Hi,
I am getting below error while trying to access datasets via power bi apis. I am using Power Shell script .

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

Went through the link https://github.com/Microsoft/powerbi-powershell/issues/60which says about the issue but there is no well defined outcome in order to fix this.

I have been trying for long on this but could not get any relevant solution. Has someone faced similar issue and got some resolution for the same?

Status: Needs Info
Comments
v-jiascu-msft
Microsoft Employee

Hi @naman27101985,

 

Which version do you have? I would suggest you upgrade the module to the latest version and try again. That issue is a half year ago. BTW, I would suggest you uninstall it and then install the latest version. 

Use this command to check which version you have.

 Get-Module -all -listavailable | Where-Object {$_.name -like "microsoftpowerbi*"}

Best Regards,

Dale 

 

v-jiascu-msft
Microsoft Employee
Status changed to: Needs Info
 
simontaylor
Microsoft Employee

I am facing the same issue here. My versions are listed as below.

 

ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 1.2.1077 MicrosoftPowerBIMgmt
Binary 1.2.1077 MicrosoftPowerBIMgmt.Admin {Add-PowerBIEncryptionKey, Get-PowerBIEncryptionKey, Get-PowerBIWorkspaceEncryptionStatus, Switch-PowerBIEncryptionKey...}
Binary 1.2.1077 MicrosoftPowerBIMgmt.Capacities Get-PowerBICapacity
Binary 1.2.1077 MicrosoftPowerBIMgmt.Data {Add-PowerBIDataset, Set-PowerBITable, New-PowerBIDataset, New-PowerBITable...}
Binary 1.2.1077 MicrosoftPowerBIMgmt.Profile {Connect-PowerBIServiceAccount, Disconnect-PowerBIServiceAccount, Invoke-PowerBIRestMethod, Get-PowerBIAccessToken...}
Binary 1.2.1077 MicrosoftPowerBIMgmt.Reports {Get-PowerBIReport, New-PowerBIReport, Export-PowerBIReport, Get-PowerBIDashboard...}
Binary 1.2.1077 MicrosoftPowerBIMgmt.Workspaces {Get-PowerBIWorkspace, Get-PowerBIWorkspaceMigrationStatus, Add-PowerBIWorkspaceUser, Remove-PowerBIWorkspaceUser...}