pnp / PnP-Sites-Core

Microsoft 365 Dev PnP Core component (.NET) targeted for increasing developer productivity with CSOM based solutions.
Other
415 stars 642 forks source link

Set-PnPListItem Not Working for Created By and Modify By to update values. #1611

Open sivakumarkaturi opened 6 years ago

sivakumarkaturi commented 6 years ago

Hi Team,

I am using SharePoint Online version.

Set-PnpListItem is not working when i want to update the Created By or Modified column of Document library. I am facing this issue only for document libraries. Command Set-PnPListItem -List $listURL -ContentType "Item" -Identity $indListItem["ID"] -Values @{"Author" = "ctestuser@<>.onmicrosoft.com", "25"} -SystemUpdate:$true

Set-PnPListItem -List $listURL -Identity $indListItem["ID"] -Values @{"Author" = "ctestuser@<>.onmicrosoft.com"} -SystemUpdate:$true

Set-PnPListItem -List $listURL -Identity $indListItem["ID"] -Values @{"Author" = "i:0#.f|membership|ctestuser@<>.onmicrosoft.com"} -SystemUpdate:$true

Set-PnPListItem -List $listURL -Identity $indListItem["ID"] -Values @{"Author" = "25"} -SystemUpdate:$true

Set-PnPListItem -List $listURL -Identity $indListItem["ID"] -Values @{"Author" = "i:0#.f|membership|ctestuser@<>.onmicrosoft.com"}

For remaning list/Links/Events it is working fine. Need support how to update the created by or modify By columns using Pnp Powershell.

With Regards Siva Kumar

heinrich-ulbricht commented 5 years ago

Duplicate of #1609?