Updated: Sep 16
Sometimes, when working with SharePoint Security, you want to grant particular roles to users or groups, e.g.,
- Grant Tony Full Control Access to Document Library A
- Grant Eamon Contribute Access to Document Library B
... and so on. This is pretty simple through the SharePoint User Interface, but sometimes via the API it's a little more tricky as you have to specify the role using a Role ID.
Hardcoded numbers are generally a bad thing and frowned upon in the IT world, but hey ho, SharePoint does use Hardcoded Numbers for these Role IDs.
These are listed in the short table below.