Aug 16 2022 12:43 AM - edited Aug 16 2022 12:47 AM
Hi all,
Is it somehow possible to recreate the owner group (object) for a Teams SharePoint site?
The following screenshot shows that the group with the members (of the Teams team) is correctly setup but the owner group is missing.
So basically the default groups (owners, members and visitors) are there but the object which contains the owners of the connected Azure AD group is missing:
The members group contains the object which is linked to the Azure AD group members of the Teams team:
But in the owner group the corresponding object is missing and I haven't found a possibility to (re)add it.
Also when I check all users on people.aspx, I can only find the object for the members.
Is there a way to restore/readd the owner object and add it to the above mentioned owner group?
Thanks for you help!
Aug 16 2022 03:22 AM
@DanielK00 Usually when you create a team site connected with M365 group, M365 group owners object is added to SharePoint site owners group but it is hidden.
Follow steps given in this thread to make it visible in SharePoint site owners group: Office 365 Group Owner not showing in SharePoint group
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Aug 16 2022 03:34 AM
Aug 16 2022 03:51 AM
@DanielK00 Can you go to User Information List using below URL & check if owners group name is shown in the list?
<siteUrl>/_layouts/15/people.aspx?MembershipGroupId=0
If it is available in the list, you can click on the group name and get the SharePoint ID for it from URL (userdisp.aspx?ID=##). Then try adding it to SharePoint owners programmatically.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Aug 16 2022 04:38 AM
Hi @ganeshsanap,
So after doing above mentioned steps also for the list view on people.aspx, I was abled to find the owner object:
For some reason it's checkbox is somehow greyed out and also I can't add it to the site owner group with the ID listed in the account property of this object:
Compared to the member object the account property entry is extended by the _o at the end which indicates the owners but when I try to add it to the site owner group, SharePoint only recognizes the members object (although the ID with the _o extension is used):
Is there another way to add it?
Thank you!
Aug 16 2022 05:10 AM
Solution@DanielK00 I was able to add M365 group to SharePoint group programmatically using flow:
Where 6 in first HTTP request action is SharePoint ID of M365 group from User Information List:
Uri: _api/web/getuserbyid(6)
and 3 in second HTTP request action is SharePoint group ID:
Uri: _api/web/sitegroups/GetById(3)/users
Expression for LoginName in Body of second HTTP request action:
body('Send_an_HTTP_request_to_SharePoint')['d']['LoginName']
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Aug 16 2022 05:10 AM
Solution@DanielK00 I was able to add M365 group to SharePoint group programmatically using flow:
Where 6 in first HTTP request action is SharePoint ID of M365 group from User Information List:
Uri: _api/web/getuserbyid(6)
and 3 in second HTTP request action is SharePoint group ID:
Uri: _api/web/sitegroups/GetById(3)/users
Expression for LoginName in Body of second HTTP request action:
body('Send_an_HTTP_request_to_SharePoint')['d']['LoginName']
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.