Skip to main content
Contributor
August 28, 2024
Solved

Logon Status Code Definitions

  • August 28, 2024
  • 2 replies
  • 0 views

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! 

Best answer by JJones

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.

2 replies

JJonesOneStream EmployeeAnswer
OneStream Employee
August 28, 2024

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.

cap08Author
Contributor
August 29, 2024

Thanks JJones!

Expert
August 29, 2024

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).

cap08Author
Contributor
August 29, 2024

Thank you so much!