Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to add a group that contains every user on my SharePoint application.

How would I do this?

I tried to get the BUILTIN\users or the NT Authenticated\Authenticated users from the SPWeb.SiteGroups[name]...

If I add BUILTIN\users from SP GUI it works... Is there something I need to enable to do that? I need to have a document library in which every user (10,000) can contribute... Are there other ways?

Thank you

share|improve this question

1 Answer 1

up vote 5 down vote accepted

You can get all authenticated users like below

SPUser allusers = web.EnsureUser("NT AUTHORITY\\authenticated users");
share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.