Hi @Mattps ,
You can add users to a site group using this PnP PowerShell:
#Config Variables
$SiteURL = "https://yourdomain.sharepoint.com/sites/xyzax-version1" $GroupName = "group2"
$UserLoginID = "******@yourdomain.onmicrosoft.com" #Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)
#sharepoint online powershell to add user to group
Add-PnPGroupMember -LoginName $UserLoginID -Identity $GroupName
Remember to replace the variable $SiteURL, $GroupName, $UserLoginID with your own.
My test result, very successful:
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.