Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

users who have NOT logged in to Sharepoint

  Asked By: Dominic    Date: Oct 14    Category: Sharepoint    Views: 1415

Can I get a complete list of users with their most recent login date, so I can see who has not logged into a Sharepoint Site?

I know behind site settings, then site administration, I can get a complete list of users under ‘manage users’.

And at that same page, I can View Site Usage Data and then select and run the By User report which shows me who has logged in (how often and most recently). With these 2 data sources, I have to compare them by hand to see who is on one, but not on the other. With a site that has hundreds of members, this is much too cumbersome.

Have I overlooked a way to identify folks who have NOT logged in?

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Scott Nelson     Answered On: Oct 14

Command line stuff and unix-related utility references… so if you’re looking for an out-of-the-box gui, this isn’t it.

I would think the quick and dirty way is to export this data  into text files, then use windiff, sdiff or fgrep utility (many freeware versions available) on the files to find out which users  haven’t logged  in..

Ie, make a file that has the users from the By user  report. Call it users-logged-in.txt. Then make a file from the manage users, or use csvde or ldifde to manually pull all users from the domain. Call it all-users.txt


use awk/perl/vi/ your favorite powerful text tool to quickly make the files “look” the same… ideally, each file should just have the usernames if I understand your requirements.

Then use diff or fgrep to see what users are in all-users.txt but aren’t in users-logged-in.txt

For more info on ldifde and csvde see
www.microsoft.com/.../sag_ad_ldif_csv.htm


Example:

First, I’ll assume that you can copy/paste or otherwise get the list  of all the users from the By users report. Call this file users-logged-in.txt, and make sure it has single usernames on each line.



Second, we’ll need to make a file from ldifde, so that it just has the username (see cygwin for more information)



C:\ >ldifde -r "(&(objectClass=user)(!userAccountControl=514)(!objectClass=computer))" -l "samAccountName" -f all-users-full.txt

Connecting to "domain controller"

Logging in as current user using SSPI

Exporting directory to file all-users-full.txt

Searching for entries...

Writing out entries.......................................................

454 entries exported


The command has completed successfully

[strip out the extra stuff and make a single file]


C:\>grep -i samaccountname all-users-full.txt | gawk ‘{print $2}’ > all-users.txt

[again, grep, gawk, etc are tools from www.cygwin.com" target="_blank" rel="nofollow">www.cygwin.com]


Let’s say all-users.txt contains

[root@syslog tmp]# cat all-users.txt

userA

userB

userC

userD

userE

user1

user2

user3

user4

user5

user6



and users-logged-in.txt contains



[root@syslog tmp]# cat users-logged-in.txt

user1

user2

user3

user4

user5



So you just do the diff or fgrep (I’m using cygwin tools from www.cygwin.com" target="_blank" rel="nofollow">www.cygwin.com that you can easily load on a Windows box, but any good Unix system should have them)



[root@syslog tmp]# fgrep -v -f users-logged-in.txt all-users.txt

userA

userB

userC

userD

userE

user6



So, it gives me all the users in the domain (from all-users.txt) that haven’t logged in (from users-logged-in.txt)

 
Answer #2    Answered By: Blake Marshall     Answered On: Oct 14

I would think that a relatively simple Web Part could be constructed that
would retrieve all the users  for a site  from the API and then excluded the
ones that had logged  in recently  (recently defined using custom property or
fixed number of days). That would potentially be easier and certainly be
reusable.

 
Answer #3    Answered By: Dwayne Jensen     Answered On: Oct 14

I don't have time to investigate it right now; I don't even have Site Usage
Analysis Logging enabled. But, I would try to mimic the same call that
SharePoint is using making from /_layouts/1033/usageDetails.aspx.

 
Answer #4    Answered By: Jose Baker     Answered On: Oct 14

Ok well the users  part is easy the recently logged  on ..hmm.. Depends how
you where to log that, you could "mine" the IIS log to see that... If you
come up wih a solution please share it I am curious!

 
Didn't find what you were looking for? Find more on users who have NOT logged in to Sharepoint Or get search suggestion and latest updates.




Tagged: