
Hi @john john
You can use following pnp powershell to add users to groups
$UserIDs = "******@crescent.com","******@crescent.com"
Connect-PnPOnline -Url https://crescent.sharepoint.com/sites/test -Interactive
#Get the Associcated Owners group of the site
$Web = Get-PnPWeb
$Group = Get-PnPGroup -AssociatedOwnerGroup
#sharepoint online add user to group powershell
ForEach($User in $UserIDs)
{
Add-PnPGroupMember -LoginName $User -Identity $Group
Write-host -f Green "`tAdded $User to $($Group.Title)"
}
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.