none
PWA - Sharepoint Server 2013 sync issue RRS feed

  • Question

  • Hi,

    I've a Sharepoint Farm with PWA integration

    I've created many project sites (Project permission mode is active)

    Every time I create a site, I create N groups on it with the following code:(web is project web site)

              
    web.SiteGroups.Add(groupName, web.CurrentUser, web.CurrentUser, description);
    
                SPGroup group = web.SiteGroups[groupName];
                try
                {
                    SPGroup owner = web.SiteGroups[groupName];
                    group.Owner = owner;
                }
                catch { }
    
                SPRoleAssignment roleAssignment = new SPRoleAssignment(group);
                roleAssignment.RoleDefinitionBindings.Add(web.RoleDefinitions.GetByType(roleType));
                web.RoleAssignments.Add(roleAssignment);
                group.AllowMembersEditMembership = false;
                group.OnlyAllowMembersViewMembership = false;
                group.AllowRequestToJoinLeave = false;
                group.AutoAcceptRequestToJoinLeave = false;
                web.AssociatedVisitorGroup = group;
                group.Update();
                web.Update();

    Only the last group I create seems to be synced with Project:

    If I add users to last group from Sharepoint and then I force synchronization from PWA administration on website, group is cleared.

    Other groups maintain users

    If I add another group to project site, it's this one that is synchronized

    Could you explain this behaviour?

    Thanks in advance

    Bye

    Friday, March 30, 2018 9:42 AM

All replies

  • Hello,

    So without your customer code running, are users added to the correct groups on the Project Site based on their access in PWA / to the associated project when you publish the project? Or have you disabled to default Project Site user sync?

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS | MVP | Downloads

    Saturday, March 31, 2018 9:43 PM
    Moderator
  • Project Site user sync is enabled.

    I create Sharepoint groups on project site with code I've posted, but only the last one has this problem.

    I cannot explain this behaviour, I would expect this behaviuor on all groups created in this way or to no one.

    My goal would be that these groups haven't to be synchronized

    Tuesday, April 3, 2018 7:45 AM