Unable to get List Item Id value in o365 spo listitem list command #1762
-
Hi @waldekmastykarz @garrytrinder @VelinGeorgiev, I am getting the following error when I try to get the list items. If I exclude the Id field from the fields parameter, all works good. Any idea?
FYI - The below code returns the expected outcome |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The issue is specific to PowerShell implementation of
We should consider removing duplicate properties from our output in this case. |
Beta Was this translation helpful? Give feedback.
The issue is specific to PowerShell implementation of
ConvertFrom-Json
rather than the CLI, see the below output from my tests.ConvertFrom-Json
appears to be unable to handle properties with the same name but have different casing, adding the-AsHashtable
switch works around the issue in PowerShell Core, however I do know that-AsHashtable
is not present in PowerShell 5 which is bundled with the Windows OS, so users will have to use the Replace workaround as you have already stated, which is less than ideal.We should consider removing duplicate properties from our output in this case.