Copy permissions from one user to another user - SharePoint
I want to copy the permissions of a user and to another user. I know i can do it by creating a group with required permissions and adding the users will do it. But i dont want to create a group. Is there a way to copy the permissions of a user to another user开发者_开发问答 directly?
NLV
You need to write code that will;
- Check if the current site inherits permissions or sets its own
- From the site that sets permissions (self or ancestor, depending on 1) go over the RoleAssignments collections
- For each role assignment check if your source user is specified
- If so, create a role assignment for the target user
This code must run under administrative privileges (RunWithElevatedPrivilegese will suffice if written as web part)
There is no way to copy permissions between users through SharePoint itself, you will have to write a script to do it for you.
There is no OOTB way to clone SharePoint user permissions. You should either use 3rd party tools such as ShareGate, Axceler ControlPont, Boost Solutions's Permission manager or Use this PowerShell script way: Copy Permissions from One User to Another in SharePoint using PowerShell
Copy Permissions from One User to Another in SharePoint using PowerShell
精彩评论