PnP template provisioning, how to set sitegroup as associated owner group

%3CLINGO-SUB%20id%3D%22lingo-sub-269236%22%20slang%3D%22en-US%22%3EPnP%20template%20provisioning%2C%20how%20to%20set%20sitegroup%20as%20associated%20owner%20group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-269236%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20using%20pnp%20template%20provisioning%20and%20have%20an%20xml%20template.%20In%20the%20xml%20template%20I%20created%26nbsp%3B1%20custom%20site%20group.%20I%20would%20like%20to%20set%20this%20group%20as%20an%20associated%20owner%20group.%20How%20to%20do%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESee%20below%20the%20sitegroup%20definition%20in%20my%20pnp%20template%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CEM%3E%3CSITEGROUPS%3E%3C%2FSITEGROUPS%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSITEGROUP%20title%3D%22%26quot%3BMyCustomOwnerGroup%26quot%3B%22%20description%3D%22%26quot%3BMyCustomOwnerGroup%26quot%3B%22%20owner%3D%22%26quot%3Bi%3A0e.t%7Cadfs%7Csomeusername%40mycompany.com%26quot%3B%22%20onlyallowmembersviewmembership%3D%22%26quot%3Bfalse%26quot%3B%22%20allowmemberseditmembership%3D%22%26quot%3Btrue%26quot%3B%2F%22%3E%3C%2FSITEGROUP%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%3CEM%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CP%3E%3C%2FP%3E%3CLINGO-SUB%20id%3D%22lingo-sub-269317%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%20template%20provisioning%2C%20how%20to%20set%20sitegroup%20as%20associated%20owner%20group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-269317%22%20slang%3D%22en-US%22%3E%3CP%3EA%20workaround%20for%20now%20is%20to%20do%20it%20in%20pnp%20powershell%20after%20the%20pnp%20template%20provisioning%20is%20finished%3A%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ESet-PnPGroup%20-Identity%20%22MyCustomOwnerGroup%22%20-SetAssociatedGroup%20Owners%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

I am using pnp template provisioning and have an xml template. In the xml template I created 1 custom site group. I would like to set this group as an associated owner group. How to do this?

 

See below the sitegroup definition in my pnp template:

 

<pnp:SiteGroups>
          <pnp:SiteGroup Title="MyCustomOwnerGroup" Description="MyCustomOwnerGroup" Owner="i:0e.t|adfs|someusername@mycompany.com" OnlyAllowMembersViewMembership="false" AllowMembersEditMembership="true"/>
</pnp:SiteGroups>

1 Reply
Highlighted

A workaround for now is to do it in pnp powershell after the pnp template provisioning is finished:


Set-PnPGroup -Identity "MyCustomOwnerGroup" -SetAssociatedGroup Owners