Forum Discussion
Restore Teams site owner group (object)
- Aug 16, 2022
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.
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.