We are under construction!

You may experience downtime, errors or visual oddities, but we anticipate all will be resolved by the end of the day.

Forum Discussion

cap08's avatar
cap08
New Contributor III
4 months ago

Logon Status Code Definitions

Hello, where can I find the definitions of the LogonStatus codes in the UserLogonActivity table? I checked the design document and didn't see them there.

Thanks! 

  • These are not documented in the OneStream documentation, however I can provide some of them here for you:

    Logged On: 0

    Failed Logon Attempt: 1

    Logged Off by User: 2

    Logged off By System: 4

     Hope this is able to answer your question.

  • You can get the items in an Enum type object with this code:

    Dim msg As String = String.Empty
    
    Dim enumType As Type = GetType(LogonStatus)
    Dim names As String() = System.Enum.GetNames(enumType)
    Dim values As Integer() = System.Enum.GetValues(enumType)				
    For I As Integer = 0 To names.Length-1
        msg &= $"{vbCrLf} - {names(I)}, {values(I)}"
    Next
    BRApi.ErrorLog.LogMessage(si, msg)

    That gives a list like this:

    - LoggedOn, 0
    - FailedLogonAttempt, 1
    - LoggedOffByUser, 2
    - LoggedOffByAdmin, 3
    - LoggedOffBySystem, 4
    - ImportedItem, 99999
    - Unknown, -1

    You can then use it for other Enum objects such as TaskActivityType and TaskActivityStatus.

    There is an example in the System Diagnostics app in OSD_SolutionHelper (the unencrypted one obviously).

  • JJones's avatar
    JJones
    New Contributor III

    These are not documented in the OneStream documentation, however I can provide some of them here for you:

    Logged On: 0

    Failed Logon Attempt: 1

    Logged Off by User: 2

    Logged off By System: 4

     Hope this is able to answer your question.

  • MarcusH's avatar
    MarcusH
    Contributor III

    You can get the items in an Enum type object with this code:

    Dim msg As String = String.Empty
    
    Dim enumType As Type = GetType(LogonStatus)
    Dim names As String() = System.Enum.GetNames(enumType)
    Dim values As Integer() = System.Enum.GetValues(enumType)				
    For I As Integer = 0 To names.Length-1
        msg &= $"{vbCrLf} - {names(I)}, {values(I)}"
    Next
    BRApi.ErrorLog.LogMessage(si, msg)

    That gives a list like this:

    - LoggedOn, 0
    - FailedLogonAttempt, 1
    - LoggedOffByUser, 2
    - LoggedOffByAdmin, 3
    - LoggedOffBySystem, 4
    - ImportedItem, 99999
    - Unknown, -1

    You can then use it for other Enum objects such as TaskActivityType and TaskActivityStatus.

    There is an example in the System Diagnostics app in OSD_SolutionHelper (the unencrypted one obviously).