0

When I tried and added multiple people to grant permission, it only accepts the first name only.

I have a few hundred people. But it only accepts names one by one.

  • Are you adding these users directly on site or in the group? Manually or by using any code? Please add more details to your question. – Ganesh Sanap Mar 5 at 2:08
  • As a group manually from permissions – Tracy Meekins Mar 5 at 3:42
  • Hi Tracy, especially as a new user , you should really provide more information or screenshots. This will save all of the various questions like "What version of SharePoint is this", what screen are you trying to do this on etc. – James Randal Mar 5 at 8:00
0

You can enter the usernames (domain\user) into a txt file, and then use PowerShell commands to get users from the file, add users to the group via PowerShell.

Add-PSSnapin microsoft.sharepoint.powershell
$Users = Get-Content "c:\Users.txt" 
$siteCollUrl = "http://sp/sites/team"
$web = Get-SPWeb -identity $siteCollUrl
#Get the SharePoint Group
$group= $web.Groups["test"]
foreach ($User in $Users) { 
    $useraccount =$web.EnsureUser($User)    
    Set-SPUser -Identity $useraccount -Web $siteCollUrl -Group $group   
} 

Demos to add users to a SharePoint group using PowerShell:

https://manasbhardwaj.net/add-users-sharepoint-group-using-powershell/

http://www.sharepointdiary.com/2016/04/add-user-to-sharepoint-group-with-powershell.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.