none
How to know Login and Logout Details of a user in SharePoint online 2013? RRS feed

  • Question

  • Hi All,

    I am working on SharePoint 2013 Online.

    I want to know the Login and logout details of a SharePoint user.

    I've tried with Popularity Trends,but i am getting ID's of users instead of User names.

    How it is possible?

    Please help me out here.

    Thanks and Regards,

    Santhoshi

    Monday, October 28, 2013 6:00 AM

Answers

  • Hi,

    According to your post, my understanding is that you want to monitor user’s login and logout details in SharePoint online 2013.

    Popularity Trends just provide a report to show historical usage information about the site, such as the number of views and unique users. We can also use this report to identify usage trends and to determine times of high and low activity. We can’t use it to monitor user’s login and logout details.

    We can use cookie to be a flag for checking whether there is an user just log in. After the page loaded, if the cookie is null, it suggests that there is an user just log in our site, then we can get this user’s information using JavaScript Object Model and add the information into a custom list.
    With this list, we can monitor user’s login details.

    Here are the steps for your reference:
    1. Create a Custom List and add some columns needed.
    2. Write a method to be executed after the page loaded completely using JavaScript. In this method, we can try to get the specific cookie and determine whether to get the current user’s information.
    3. Then we can add this code snippet into the master page to make it be executed after site pages loaded.

    Best Regards,
    Dennis Guo


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

    Wednesday, October 30, 2013 1:59 PM
    Moderator

All replies

  • Hi,

    According to your post, my understanding is that you want to monitor user’s login and logout details in SharePoint online 2013.

    Popularity Trends just provide a report to show historical usage information about the site, such as the number of views and unique users. We can also use this report to identify usage trends and to determine times of high and low activity. We can’t use it to monitor user’s login and logout details.

    We can use cookie to be a flag for checking whether there is an user just log in. After the page loaded, if the cookie is null, it suggests that there is an user just log in our site, then we can get this user’s information using JavaScript Object Model and add the information into a custom list.
    With this list, we can monitor user’s login details.

    Here are the steps for your reference:
    1. Create a Custom List and add some columns needed.
    2. Write a method to be executed after the page loaded completely using JavaScript. In this method, we can try to get the specific cookie and determine whether to get the current user’s information.
    3. Then we can add this code snippet into the master page to make it be executed after site pages loaded.

    Best Regards,
    Dennis Guo


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

    Wednesday, October 30, 2013 1:59 PM
    Moderator
  • Hi, I have a similar requirement where I would like to capture various events occurring in SharePoint online. I have developed Remote Event Receivers for various activities, Not sure if we have an event receiver for user login/logout. Can you kindly point me to an example or source from where I can write a method to execute after a page is loaded for SharePoint online. Thanks, Anil
    Tuesday, December 16, 2014 2:01 PM