Working as a SharePoint administrator is a challenging task. It involves several challenges such as creating and managing multiple SharePoint sites, performing redirections, etc. Apart from all of these complex tasks, there is one more, adding a user to a SharePoint group. After creating the user group to reduce the permissions management, it also required to know how to add a user to a SharePoint group.
Table of Content
In this article, we will discuss the different methods to add a user to a SharePoint group. So, let’s get started.
Benefits of Creating Groups in SharePoint
There are ample benefits of creating groups in SharePoint, let’s explore some major ones.
- Permissions management becomes simpler by assigning permissions to groups rather than individual users. It reduces the overhead of the SharePoint admins.
- Adding users to a SharePoint group enhances the communication and knowledge sharing between the users.
- Because of the SharePoint group permissions management, no unauthorized user accesses the group data.
- Creating SharePoint groups based on the teams or projects enhances the productivity of the members by retrieving data from a single source.
- SharePoint groups allow to addition or removal of users as per the project or team requirements.
There are different levels of customizations of permissions available in the SharePoint groups.
#1. How to Add a User to a SharePoint Group Using PowerShell?
Using the PowerShell command, you can add the users to the SharePoint group. However, inappropriate execution of the commands can lead you data loss or data corruption issues. If you have experience with PowerShell and already automated some tasks in SharePoint, then you are good to go with this method.
$web_Details=Get-SPWeb “Provide the address of web" $Name_of_Group= $web_Details.Groups["Accounts"] $Users_Name = "domain\userName" $user_to_add = $web_Details.EnsureUser($Users_Name) $Name_of_Group.AddUser($user_to_add)
#2. SharePoint Admin Center Interface to Add a User to a SharePoint Group
By using the SharePoint admin center you can add the users easily. Below are some steps that you can use.
1. Sign in to the SharePoint Online account
2. Click on the Settings icon and then choose the Site Permissions.
3. Go to the Advanced permissions settings.
4. Select the group to add users.
5. Now within the group option, hit the New option and then click on Add Users.
6. Locate the users and hit the Share button.
#3. PnP PowerShell to Add a User to a SharePoint Group
Follow the PnP PowerShell commands for adding a users into the SharePoint groups.
$SP_Site_URL = "complete SharePoint site URL" $SharePointGroup = "Accounts Details" $userID_to_add = "" Connect-PnPOnline -Url $SP_Site_URL -Interactive $Group_Members = Get-PnPGroupMember -Identity $SharePointGroup | Select-Object -ExpandProperty Email if ($Group_Members -contains $userID_to_add) { Write-Host "$UserID_to_add is already a member of $SharePointGroup." } else { Write-Host "$userID_to_add is not a member of $SharePointGroup. Adding..." Add-PnPGroupMember -LoginName $UserID_to_add -Identity $SharePointGroup }
#4. Use Power Automate Method
By using Microsoft Power Automate you can add a user to a SharePoint group by sending the HTTP request. You need to include the SharePoint group ID and email address of the user.
Method: POST Uri: _api/web/siteGroups/GetById()/users Headers: { “accept”: “application/json;odata=verbose”, “content-type”: “application/json;odata=verbose” } Body: { “__metadata”: { “type”: “SP.User” }, “LoginName”: “i:0#.f|membership|” }
SharePoint Sites Migration
There might be a situation when you need to perform SharePoint tenant to tenant migration. It might be because of organizational mergers, restructuring, etc. Then you can use the Most Efficient SharePoint Migration Tool to accomplish the migration process.
This tool is developed not only for SharePoint migration experts but also for non-technical users. Its impeccable features make it the best tool for an error-free migration process. You can use the tool with the below steps.
- Download and Launch the SharePoint migration tool.
- Choose Source and Destination platforms.
- Enable the Sites checkbox.
- Start providing the Source SharePoint account details.
- After that, enter the destination account credentials.
- Now, add the users and sites for migration in the tool.
- Lastly, click on the Start Migration button and initiate the process.
Conclusion
In this article, we have discussed how to add a user to a SharePoint group. We have elaborated on the multiple methods including the Admin Center, PowerShell, and Power Automate. Now you can select any of the methods that you can use effortlessly.