Showing results for 
Show  only  | Search instead for 
Did you mean: 

last users access


last users access

How could I list the last users access using API?

Tags (3)
2 Replies

Re: last users access

Hello agiovannetti


As far as I know, the is no such API function


For windows Front-end, this kind of information (last connection) is saved in .ini files related to windows profiles (not centralized).


For web Front-End, starting with HOPEX V1R2, there are supervision events (LoginAuthenticationSuccess, LoginAuthenticationFailure...) that log this but so far no API to access this information.

It is a need and it is likely that API will be available in the future.

As supervisor logs are text files, you can consider to parse such files.


Re: last users access

Hello Andrea,


you could also use a script that would write a text file each time a user connects to MEGA.

You could use a macro  similar to this one :


Sub lastUserAccess()

  Dim macroGlobals, pathFile, strInfo, userName, fso

  pathFile = <pathToYourFile>
  nomUser = getObjectFromId(megaEnv.getCurrentUserId).getProp("short name")
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set myFile = fso.OpenTextFile(pathFile, 8, True)
  myFile.WriteLine(username & ";" & & ";" & Date())
  Set myFile = nothing
  Set fso = nothing

End Sub


Then, create a MetaCommand linked to your "Repository" metaClass and connect it to your macro.

Every time a user connects to MEGA, it will be logged in your text file :-)