开发者

Copy permissions from one user to another user - SharePoint

开发者 https://www.devze.com 2023-01-18 14:44 出处:网络
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 th

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;

  1. Check if the current site inherits permissions or sets its own
  2. From the site that sets permissions (self or ancestor, depending on 1) go over the RoleAssignments collections
  3. For each role assignment check if your source user is specified
  4. 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

0

精彩评论

暂无评论...
验证码 换一张
取 消