Hi experts
There are countless posts on how to patch a person into a person field on a sharepoint list. In my app I want to patch users but also groups into a person field. With the users everything works as desired. But with groups I have problems. For this I also find practically no forum posts.
I create a collection of all selected items of a gallery and want to patch them to the sharepoint list.
The necessary attributes are available in the collection:

Here is my code:
ClearCollect(PatchGroups,GroupsAddedGallery1.AllItems);
Patch(PeoplePicker, {ID: Gallery2.Selected.ID}, {MyGroups: ForAll(PatchGroups As aGroup, {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpanderUser",Claims: "c:0o.c|federateddirectoryclaimprovider|" & aGroup.id, Department: "", DisplayName: aGroup.displayName, Email: "", JobTitle: "", Picture: SampleImage } ) } )
But when patching I get a network error, which indicates that a necessary value is missing. I also don't know if I need the #Microsoft.Azure.Connectors.SharePoint.SPListExpanderUser for groups as well.
Does anyone have a tip for me on this ?
Best regards Tom