Is there any way to get user logged details report in sharepoint online office 365.Any suggestion would be helpful. Thanks in advance.
In SharePoint online, you can get the current logged in user by using this code.
Best and simple way to get current logged in user name is _spPageContextInfo.
_spPageContextInfo is a global variable usually available on any SharePoint page. This variable stores basic information about current web and current user.
Below are the Some examples:
To Get User Display Name:
To Get User Login Name:
To Get User Id: