Here we will discuss how we can get user permissions for a site using CSOM in SharePoint online.
Pre Requisites:
1. Must have SharePoint online site access
2. Must have a user account and password, which has at least manage permission access to the site
3. Visual Studio to run the code with Microsoft.SharePoint.Client dll of version 15.0 and onwards
Code:
1. Get Client Context:
2. Get the permission set
3. Usings:
4. Out put :
Read SharePoint 2013 csom articles:
- Steps to add items from CSV file to SharePoint Online List using PowerShell in CSOM
- Retrieve list content types using csom in SharePoint online or SharePoint 2013
- Activate SharePoint Server Publishing Feature programmatically using C#.Net .net managed object model code
- Activate Workflows can use app permissions Feature using client side object model csom in SharePoint online
- Office 365 SharePoint online Create a list from custom list template using client object model csom
Hope this will be helpful.
Hello,
This is sreedhar I am a SharePoint Administrator, Actually this has helped a lot a to me, i need your help in finding a list of site collections that a user has access to them on tenant level, is this possible to get,
any help provided will be grateful,
Thanks in advance.
Regards,
Sreedhar