Skip to main content

How to See a SharePoint Permission Level's Permissions in the Browser

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

SharePoint keeps a permission level's permissions as two numbers, High and Low. You need them to create a level with the REST API, and the browser shows them when you type one REST address into its address bar while you're signed in to SharePoint.

Syntax​

Browser address bar: general form
https://<site address>/_api/web/roledefinitions/getbyname('<level name>')?$select=Name,BasePermissions
  • <site address>: the site, as in its own address, such as contoso.sharepoint.com/sites/Finance. _api/web is the site in SharePoint's REST API (Determine SharePoint REST service endpoint URIs).
  • roledefinitions/getbyname('<level name>'): one permission level, found by the name on the site's Permission Levels page. The REST API calls permission levels role definitions, and Microsoft's Set custom permissions on a list by using the REST interface uses roledefinitions/getbyname('<name>') to find one.
  • $select=Name,BasePermissions: only the level's name and its permissions.

The Example​

The address reads the built-in Read level of the root site contoso.sharepoint.com.

Prerequisites​

  • Access to the site and a signed-in SharePoint session in the same browser. The browser sends your sign-in with the request.

Step 1: Open the Address​

In the browser where you use SharePoint, type the address in the address bar and press Enter:

Browser address bar
https://contoso.sharepoint.com/_api/web/roledefinitions/getbyname('Read')?$select=Name,BasePermissions

Use your own site's address in place of contoso.sharepoint.com.

Step 2: Read the Answer​

The browser sends no Accept header asking for JSON, so SharePoint answers in XML. In my browser it appeared as plain text:

The browser showing SharePoint's XML answer for the role definition, with m holding d of type SP.BasePermissions with d 176 and d 138612833, both marked Edm.Int64, and d Read

The values are inside m:properties:

ElementValueMeaning
d:High176Permissions 33 to 64
d:Low138612833Permissions 1 to 32
d:NameReadThe level's name

Both numbers are marked Edm.Int64, a whole number. Each permission in Microsoft's PermissionKind list is one bit of them: permission n adds 2 to the power of (n − 1) to Low when n is 32 or less, and 2 to the power of (n − 33) to High when it's 33 or more. Microsoft doesn't describe that split; I checked it by decoding the built-in levels, and each one came out with exactly the permissions Microsoft lists for it.

For Read, Low 138612833 holds View Items, Open Items, View Versions, View Application Pages, Open, View Pages, Use Self-Service Site Creation and Browse User Information, and High 176 holds Use Client Integration Features (16), Use Remote Interfaces (32) and Create Alerts (128).

The Built-In Levels​

I read every level of two sites with the same request, and the built-in levels had the same numbers on both:

LevelHighLow
Full Control21474836474294967295
Design4321012866047
Edit4321011030767
Contribute4321011028719
Read176138612833
Limited Access48134287360

Common Mistakes​

MistakeWhat happensDo this instead
Copying the numbers from another levelThe new level gets that level's permissionsRead the level you mean to start from
Treating High and Low as one numberThe permissions come out wrongKeep them apart: they're two halves
Adding a permission's number to the wrong halfThe level gets an unrelated permissionPermissions 1 to 32 go in Low, 33 and up in High

Troubleshooting​

SymptomLikely causeFix
An error that the level doesn't existThe name in getbyname('…') is wrongCopy the name from Permission Levels
A sign-in page or an access errorThe browser isn't signed in, or you can't open the siteSign in to SharePoint in the same browser
The answer is one long lineThat's how the browser shows XMLLook for d:High and d:Low in it

FAQ​

Can I see every level at once?​

Yes. Leave out getbyname('<level name>'): …/_api/web/roledefinitions?$select=Name,BasePermissions lists every level of the site, including Limited Access, which the Permission Levels page doesn't show.

Is this safe to try on a real site?​

Yes. Opening an address in the browser sends a GET request, which only reads: Microsoft's Get to know the SharePoint REST service lists GET as the way to read a resource.

How do I use the numbers?​

Add or take away the permissions that differ, then create the level from a flow, as in How to Create a SharePoint Permission Level with the REST API in Power Automate. For example, Read plus Add Items (permission 2, worth 2 in Low) is High 176 and Low 138612835.

Conclusion​

Open https://<site address>/_api/web/roledefinitions/getbyname('<level name>')?$select=Name,BasePermissions in a signed-in browser. d:High and d:Low in the answer are the level's permissions, ready to copy into a flow that creates a level like it.

Additional Resources​