using( ClientContext clientContext = new ClientContext("http://Server/sites/SiteCollection"));
{
#Get Group Collection
GroupCollection collGroup = clientContext.Web.SiteGroups;
clientContext.Load(collGroup);
clientContext.Load(collGroup,
groups => groups.Include(
group => group.Users));
clientContext.ExecuteQuery();
#iterate through group
foreach (Group oGroup in collGroup)
{
UserCollection collUser = oGroup.Users;
foreach (User oUser in collUser)
{
#check if user is exist or not
}
}
}
Thursday, May 31, 2018
How to get current User's group using CSOM C#
Subscribe to:
Post Comments (Atom)
Server Error in '/' Application when activating "Nintex Forms" web app feature.
Apparently "INSTALL-NFService" need to be run in SharePoint PowerShell to fix this problem. When I installed Nintex Forms agai...
-
Apparently "INSTALL-NFService" need to be run in SharePoint PowerShell to fix this problem. When I installed Nintex Forms agai...
-
Most of the errors while troubleshooting provider hosted high-trust configuration are mostly related to authentication and add-ins & S...
-
In this article I explain how to change the standard server side to a custom client side form validation. You can’t really change for serv...
No comments:
Post a Comment