Saturday, October 16, 2010

Difference between SPWeb.Users, SPWeb.AllUsers, SPWeb.SiteUsers

SiteUsers,  AllUsers and  Users are properties of SPWeb Object. But looking to this properties name,  its not easy to understand their’s scope.  So below is description about this properties:-



  1. SPWeb.Users :- This represents the collection of users or user objects who have been explicitly assigned permissions in the Web site . This does not return users who have access through a group.
  2. SPWeb.AllUsers :-This gives us the collection of user objects who are either members of the site collection or who have atleast navigated to the site as authenticated members of a domain group in the site.
  3. SPWeb.SiteUsers :- This is the collection of all users that belong to the site collection.

No comments:

Post a Comment