There is no direct way or correct way to get
all the all the users from “All People”
link from SharePoint using object model. I have tried every different options
from programming but none of the method gave me correct results, like
web.AllUsers, web.Users, web.SiteUsers. but these properties are giving me
incorrect results.
Basically I want to know and check how many
users into any particular SharePoint site. After digging more into it I have
found out that maybe it’s not possible to get correct count with one property,
so I have changed my code to get all the users from SharePoint site like this :
I am looping through all the SharePoint site groups and counting unique users
from code as well as from web.Users property.
This link explains the challenges with All
People count: http://www.thesug.org/Discussions/_layouts/Community/Groups/DiscussionPost.aspx?PostID=1776
No comments:
Post a Comment