background shape
background shape

How to Retrieve Last Login Information Without Server Access

Sometimes you might be tasked with finding when a particular operator logged into the Adobe Campaign Classic rich client, even if you do not have access to the actual application server.

Here is a simple JavaScript snippet that allows you to explore the ‘logins.log’ file and more. I wanted to know whether a particular user has logged into the server in the past. I can see that ‘logins.log’ only retains a year’s worth of data.

///neolane/nl6/var/your_application_instance_name

var file = new File("logins.log")
file.open();
var pattern = "opertor.name"; 
// Create a RegExp object using the pattern


var regex = new RegExp(pattern, "gi"); // 'gi' for case-insensitive and global matching
for each(var line in file)
  if(regex.test(line)) logInfo(line)
file.close()
  1. File Initialization: new File("logins.log"). You can take a look at the example code on the JSAPI documentation
  2. Open file: file.open() This method opens the file for reading. It is necessary to open a file before you can read from or write to it.
  3. Regular expression setup: Here, a regular expression pattern is defined to search within the file. The RegExp object is initialized with this pattern and the "gi" flag for global case-insensitive search.
  4. File processing: This loop iterates through each line of the file. For each line, it checks if the line matches the regular expression. If it matches, it logs the line using logInfo(line) to the workflow’s journal.
  5. Close file: file.close() After all lines are processed, the file is closed to free up system resources.

Oh hi there 👋
I have a FREE e-book for you.

Sign up now to get an in-depth analysis of Adobe and Salesforce Marketing Clouds!

We don’t spam! Read our privacy policy for more info.

Share With Others

MarTech consultant

Marcel Szimonisz

Marcel Szimonisz

I specialize in solving problems, automating processes, and driving innovation through major marketing automation platforms.

Buy me a coffee
Optimized by Optimole