Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, April 3, 2018 7:59 AM
I would like to have a last accessed date for site contents (Document libraries and lists especially) in a particular site collection.The idea is to archive only those unused contents and not the complete site collection.
I have already gone through below blog which walks through last accessed date of entire site collection but not the site contents.
Any suggestions please ?
Veeramani.S
All replies (6)
Wednesday, April 4, 2018 6:32 AM ✅Answered | 1 vote
Hi,
Enable item level audit can achieve your requirement instead of custom solution. It records when user accesses a list item.
You can check “Opening or downloading documents, viewing items in lists, or viewing item properties” option.
How to enable item level audit for your reference:
http://sharepointthomas.blogspot.sg/2011/07/how-to-enable-audit-functionality-in.html
Best Regards,
Dean Wang
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
Wednesday, April 4, 2018 7:41 AM
Hi,
Foremost , you should not use the SQL Query to retrieve any of the SharePoint artifacts as mentioned in the link you posted on your question.
Instead please use the Audit feature as suggested by Dean Wang or use programmatic approach retrieving the Audit log through programmatically .
This code snippet also can be used
Using (SPSite site = new SPSite (SPContext.Current.Site.Url))
{
DateTime lastContentModified = site.LastContentModifiedDate;
}
Murugesa Pandian MCSA,MCSE,MCPD
Gear up for some solid action by doing. Slide,theory and blog won't useful much.
After all world likes only doers not sayers/speakers .
Tuesday, April 10, 2018 8:21 AM
Hi Veeramani,
Is there any update?
If replies are helpful to you, you can mark as answer.
Best Regards,
Dean Wang
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
Friday, April 13, 2018 7:52 AM
Sorry for the late reply Dean and thanks for your input.
This is required for the sites which is already there. If I go with enabling audits, it would be audited only in future I hope.
Veeramani.S
Monday, April 16, 2018 9:26 AM
Hi,
Yes.
If you want to get the older records, you need to check the IIS logs (it records the users view SharePoint contents everytime) and filter out the information you want. It's a big project.
Best Regards,
Dean Wang
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
Thursday, April 19, 2018 12:12 PM
Hi Veeramani,
Is there any update?
If my reply is helpful to you, you can mark as answer.
Best Regards,
Dean Wang
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.