I'm writing a webpart that creates several SharePoint Groups. I'm trying to set the Group Owner so it's not defaulting to the user creating the group. According to documentation, this should be possible by passing the Group ID to Owner:
let newGroup = await myWeb.siteGroups.add({
Title: groupName,
Description: "Example of creating a group", OnlyAllowMembersViewMembership: false, Owner: ownerGroupId});
When I test this, the request throws an error, which I'm able to see people complaining about since 2015. If I remove Owner from the parameters, everything works correctly.
Is setting the Owner supported? Am I missing something obvious?