Bug: Group Creator/Owner not granted Team Site Admin Permissions
Using the following PNP code:
UnifiedGroupsUtility.CreateUnifiedGroup(Title, Description, Title, GraphToken, groupLogo: [string]);
AND using the following managed Graph API code:
` List
Group addedGroup = await client.Groups.Request().AddAsync(newGroup);`
Both behave the same. When these are run, an O365 Unified Group is Created with the creator as the owner. However, the creator/owner is not granted administrative permissions to the Group Site. To gain access to the site administratively, a second user must be assigned, then the creator removed, then the creator added back in as the owner.
This behavior also occurs with the PNP powershell script.
The graph api is not properly setting permissions within the associated group site.
Update: It appears that the above code may work after an unknown period of time elapses, but a second call to create a second group will result in the same behavior. Could be a workflow timing issue; however, I will note that group creation with the sharepoint icon in the app launcher does not suffer from the same problem.
@jchilde Thank you for posting your findings about this issue. I'm going to pass on this scenario that you described.