SPoL: Does user have Full Control, Edit or Read permissions?

Occasional Contributor

Hi,  We are trying to write a function for an add-in that determines if the currently logged in SP Online user has Full Control Permission Level, Edit or Read.  It seems to be more difficult than anticipated so perhaps we're missing something.  We currently make API calls:




And that works if the user in not a "modern authentication" user.  Meaning, if the user is in an AAD or O365 Group, and that group is given direct permission to the site, the above API's don't return those users, just the AAD/O365 group.  Then we start making graph API calls and not all of them return the users email which sets us up for more API calls.  This is getting expensive!


We're also attempting to decipher the high/low bit mask returned by the effectiveBasePermission API call. 


Are we missing something?  Is there an easier way to determine if an authenticated Sharepoint user has Full Control, Read or Edit Permission Level?





0 Replies