Adding M365Group to SharePoint Group #3507
Unanswered
pratheep-r
asked this question in
Q&A
Replies: 2 comments 28 replies
-
I tried the above code and it works fine when Get-PnPGroup -AssociatedMemberGroup only returns one group. If you have more than one group returned in line 23 PowerShell will give you an array of groups, not the group itself (this is a standard PowerShell thing). Either iterate over groups and add them one at the time, or try with $SPMemberGroup[0] |
Beta Was this translation helpful? Give feedback.
16 replies
-
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a M365 group, which I need to add to SharePoint's member group when I create the site as a part of the script. Please see the error attached.

If I provide the full name of the SharePoint member group in "Add-PnPGroupMember" it works.
Please advise/help.
Beta Was this translation helpful? Give feedback.
All reactions