msgraph-sdk-dotnet icon indicating copy to clipboard operation
msgraph-sdk-dotnet copied to clipboard

Bug: Group Creator/Owner not granted Team Site Admin Permissions

Open jchilde opened this issue 9 years ago • 2 comments

Using the following PNP code:

UnifiedGroupsUtility.CreateUnifiedGroup(Title, Description, Title, GraphToken, groupLogo: [string]);

AND using the following managed Graph API code:

` List groupType = new List(); Group newGroup = new Group { GroupTypes = new List { "Unified" }, Description = Description == null ? "No description provided" : Description, MailEnabled = false, DisplayName = Title, SecurityEnabled = true, MailNickname = Title };

        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.

jchilde avatar Mar 11 '17 20:03 jchilde

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 avatar Mar 12 '17 01:03 jchilde

@jchilde Thank you for posting your findings about this issue. I'm going to pass on this scenario that you described.

MIchaelMainer avatar Mar 21 '17 20:03 MIchaelMainer