how to grant permissions to SharePoint group

  • 21 September 2017
  • 3 replies
  • 27 views

Badge +1

Hi All,

i have created SharePoint group with nintex workflow. and able to add the user to the group with workflow. when i see the permissions it doesn't shows. can you suggest me how can i grant the permissions to the group?  


3 replies

Badge +16

What doesn't show?

Userlevel 6
Badge +16

Here is a script sample where you can use the method "addroleassignment". You must set the roledefid for your desired permission.

function setPermissionForGroup(){

$.ajax({

url: _spPageContextInfo.webAbsoluteUrl + “/_api/web/roleassignments/addroleassignment(principalid=Enter Group Id, roledefid=1073741827)",

type: "POST",

contentType: "application/json;odata=verbose",

headers: { "Accept": "application/json; odata=verbose","X-RequestDigest": $("#__REQUESTDIGEST").val(),"X-HTTP-Method": "POST" },

success: function (data) { // Returning the results alert('Contribute permission set on group'); },

error: function (data) { alert("Error: " + JSON.stringify(data)); } }); });

Here is a list of roles:

1073741829, Full Control

1073741827, Contribute

1073741826, Read

You can make the REST call on your workflow.

Userlevel 5
Badge +13

You can use the AddPermission web method in the Permissions.asmx web service.

Here's a link that helped me accomplish this: https://blog.sprider.org/2012/10/23/how-to-add-permissions-to-a-new-sharepoint-site-using-nintex

Reply