New answers tagged

0

You can use UserSelectionScope="GroupID" attribute to specify a group in your CAML query. GroupID is a group ID (integer). You can see property description on the MSDN field schema description page


0

Try modifying PrincipalAccountType="SPGroup" as MSDN says. String used to specify the type of principals to be resolved in a query Comma-separated : "User,DL,SecGroup,SPGroup"


0

Create field and while creating come at down near Choose from option and select Share Point Groups and define group name under Choose from:. Hope this will help you...


3

If you only want to add a user to a group, then do this: ClientContext client = new ClientContext("SiteURL"); Web web = client.Web; Group group = web.SiteGroups.GetByName("test Members"); User user = web.EnsureUser("mydomain\\user"); // Note the double backslash. // Add user to group. group.Users.AddUser(user); client.ExecuteQuery(); There is no need to ...


1

Go to Site Sittings page > Site Permissions page Find the SPGroup you have added there, Click on 'Edit User Permissions' in the ribbon You will be able to find the permission set for that group in the site Important: If you were unable to find the SPGroup in your Site Permissions page, the you have just created the group and you have not set permissions ...


2

If I understand your question properly then, If you click Delete Unique permissions, then all the permissions you've set uniquely will be deleted. After breaking the inheritance, if you want to remove the groups then select the names of the groups/users and click Remove User permissions. The group/users (you delete here) will not be deleted but their ...


0

Use this: /_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor(accountName=@v,propertyName='FirstName,LastName')?@v='accountName' Then you will have a FirstName and LastName property


0

You're doing a bit wrong. Replace the following code: while (userEnumerator.moveNext()) { var oUser = userEnumerator.get_current(); targetUsers += oUser.get_loginName() + ","; } WITH THE FOLLOWING CODE: while (userEnumerator.moveNext()) { var oUser = userEnumerator.get_current(); targetUsers.push(oUser.get_loginName()); } As Danny ...


0

You are declaring targetUsers as an Array: var targetUsers = []; Then appending Strings: targetUsers += oUser.get_loginName() + ",";


1

grup.Owner returns Principal object. so you can't load it using LINQ. You can load owner object for group inside foreach loop like this. ` GroupCollection collGroup = context.Web.SiteGroups; context.Load(collGroup); context.Load(collGroup, grups => grups.Include(grup => grup.Title, grup => grup.Description, grup => grup....


1

when creating a group in sharepoint, there is an option for specifying whether or not outside users can see the membership of the group. My guess is that even if she is a member of the owning group, she can't see the group(s) membership because she is not the direct group owner and the option to not show members is selected. Try editing the group and ...


0

web.SiteGroups.Add(groupName, web.SiteAdministrators[0], web.SiteAdministrators[0], ""); SPGroup group = web.SiteGroups[groupName]; // Add the group's permissions SPRoleDefinition roleDefinition = web.RoleDefinitions.GetByType(SPRoleType.Administrator);//Add Role Type as Administrator(Full Control),Contributor and Editor etc. SPRoleAssignment roleAssignment =...


0

You can write an event receiver in SharePoint 2013 to check if an user is added to a group and make other groups in sync. This feature is not available in SharePoint 2010. Refer below for complete set of clarifications: http://www.timferro.com/wordpress/archives/tag/spsecurityeventreceiver There is class inheriting from: GroupUserAddedFeatureEventReceiver :...


1

In your situation, I would create ad groups and add those ad groups in the SharePoint groups. Because you have same group name across all site collection n permission on all site collection looks like same. AD groups are easy no code solution, once you add AD groups in SharePoint then management operation is simple. simply add/remove the user in AD groups, ...


3

I tried your code and got an unknown error. So i tried removing each field in the LINQ query and I found the error is due to grup => grup.Owner. I have changed it to grup => grup.OwnerTitle and the code worked fine. Also for getting each property value of a group loop the group collection object and get its value as per below code. GroupCollection ...



Top 50 recent answers are included