Forum Discussion

MahonriCruz's avatar
MahonriCruz
New Contributor II
4 years ago

Inactivate Users Automatically

Hi to all,

Im looking for any idea on how to inactivate users automatically. Let me know your thoughts.

  • scottr's avatar
    scottr
    New Contributor III

    we integrate with our HCM system to get a list of inactive users and disable using a business rule. the “guts” of the code is below.

    Dim objUserinfo As UserInfo = BRApi.Security.Admin.GetUser( si, username )
    objUserInfo.User.IsEnabled = False

    • SaurinPatel's avatar
      SaurinPatel
      New Contributor III

      New to OneStream. Do you think you can share business rule with me?

  • NicolasArgente's avatar
    NicolasArgente
    Valued Contributor

    Hi there!
    Can you please give more info? According to what do you want to inactivate them?
    It is tipically an admin job…
    But you could have an SQL job that does it on the framework DB - Check the IsEnabled field in the table AuditSecUser
    Cheers

  • charris's avatar
    charris
    New Contributor

    What are the conditions you want to deactivate users under? There is a setting in the app config (talk to support if you're on cloud) to deactivate users when they haven't logged in for a set number of days.

    • MahonriCruz's avatar
      MahonriCruz
      New Contributor II

      We are an on-premise server. conditions should be set when bringing the status from the HR system where employees are terminated. 

      • charris's avatar
        charris
        New Contributor

        The only built-in functionality is to disable after a period of inactivity. If you are using SSO and your identity provider is integrated with your HRIS to handle disabling accounts in there then you could rely on the authentication being disabled to prevent access and the built-in feature to subsequently disable the user in OneStream. If you're not using SSO or need the process to be more expedient, then as scottr mentioned above, you can use a business rule to disable users. This can be done either by having the BR run on a schedule with access to probe your HRIS for terminated users and take appropriate action, or if your HRIS or other orchestration tool can make a call to the OneStream API, you could attach the BR to a Data Management job and pass the user to be deactivated using the DM parameters.