How to add Azure AD group or M365 group to SharePoint group? #783
-
Hi,
Using above I can add users to the group however not sure how can I add AD group or M365 group. I have tried -
but it did not work. If anyone can help me with it, that would be appreciated. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@sachinsatav : adding Azure AD security groups or members of the Microsoft 365 groups is possible, currently you'll need to correctly format the loginName. Below samples should help, the GUIDs are the object ids of the respective Azure AD objects. // Add an Azure AD security group
await addedGroup.AddUserAsync("c:0t.c|tenant|c8e69a24-a625-48d7-b80b-c9656b9d4030");
// Add an Microsoft 365 group (members)
await addedGroup.AddUserAsync("c:0o.c|federateddirectoryclaimprovider|45dfc99d-a4a5-419d-ad79-013eed517fb2"); I'll add this information to our documentation, thanks for raising this. |
Beta Was this translation helpful? Give feedback.
@sachinsatav : adding Azure AD security groups or members of the Microsoft 365 groups is possible, currently you'll need to correctly format the loginName. Below samples should help, the GUIDs are the object ids of the respective Azure AD objects.
I'll add this information to our documentation, thanks for raising this.