Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We have implemneted a bulk site creation tool and in that i am wondering how can we set access request progrmatically for the whole site collection . i know that we can set the request access for individual groups and i am able to implement it with following code .But i wnat to implement the same funcationality at the site collection level.Can some one please help me ..

My code for groups access

 SPGroup adminGroup = web.SiteGroups[groupName];
            adminGroup.Owner = adminGroup;
            adminGroup.AllowRequestToJoinLeave = true;
            PickerEntity pe = (PickerEntity)pickContact.ResolvedEntities[0];
            string email1 = pe.Description;               
            adminGroup.RequestToJoinLeaveEmailSetting = email1 + "@domain.org";
            adminGroup.Update();                

Thanks

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.