Table of contents

Official Content

It's possible to get information about all the GAM Sessions that had at least one failed login (login retries).

LoginRetryCount and LoginRetries are properties of the GAMSessionLog object. The former gets the number of login retries for that GAM Session, and the latter gives information about it. The information is a collection of GAMSessionLogLoginRetry.



In this example, we scan all the sessions of a repository; for each of them, if there was more than one login retry, we process the information of the login retries which have been made.

In order to get the GAM Sessions that have Login Retries (using the GAMRepository.GetSessionLogs method), we use the following filters (properties of GAMSessionLogFilter object)

  • LoadLoginRetries (GAMBoolean data type: True, False). Generate the query to the GAM Sessions including the LoginRetries information. This property is useful for performance reasons.
  • IncludeLoginRetriesLog (GAMBooleanFilter data type: All, True, False). Select to get the GAM Sessions that have any LoginRetry information, those that don't have any or all of them.


Event GridWW.Load

    &GAMSessionLogFilter.LoadLoginRetries        = &LoadLoginRetries
    &GAMSessionLogFilter.IncludeLoginRetriesLog = &IncludeLoginRetries
    &GAMSessionLogFilter.Start = (&CurrentPage-1) * &GAMSessionLogFilter.Limit + 1
    For &GAMSessionLog in GAMRepository.GetSessionLogsOrderBy(&GAMSessionLogFilter, GAMSessionLogListOrder.Date_Desc, &Errors)
        If &GAMSessionLog.LoginRetryCount > 0
            For &GAMSessionLogLoginRetry in &GAMSessionLog.LoginRetries
                &LoginRetriesChar = &GAMSessionLogLoginRetry.UserLogin + ".-."+ &GAMSessionLogLoginRetry.Number.ToString() 



Download the sample from GAM session handling sample.



Last update: November 2023 | © GeneXus. All rights reserved. GeneXus Powered by Globant