1

I have created a few SharePoint groups through an itemadded event receiver in my on-premise solution. user will give a title for the group and click on save button and on itemadded, I am adding sitegroup.add() and calling the web.update();

When I added a user into the group and then I checked for this user in the check permissions in site settings, am not able to see the group name against this user.

Do I need to do any extra line of code in order to update / reflect the group name against the user in the check permissions ?

for the other groups and users which were created few weeks back working perfectly.

            var allgroups = CurrentWeb.SiteGroups;
             allgroups.Add(strDivGrpName, currUser, null, 
           strDivGrpName);
            CurrentWeb.AssociatedGroups.Add(CurrentWeb.SiteGroups
            [strDivGrpName]);
                         allgroups.Add(strDivGrpName, currUser, null, 
               strDivGrpName);
               CurrentWeb.AssociatedGroups.Add(CurrentWeb.SiteGroups
          [strDivGrpName]);
                         CurrentWeb.Update();

UNABLE2SEEgroupname

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.