Inactivate Users Automatically

New Contributor

Hi to all,

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


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

Connect with me on:
If you want to lift yourself up, lift up someone else.

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

New Contributor III

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

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.

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

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.