コード例 #1
0
        public bool DeactivateUser(User oktaUser)
        {
            bool result = false;

            try
            {
                _usersClient.Deactivate(oktaUser);
                _logger.Info(string.Format("Deactivated user in Okta. Okta Login: {0}.", oktaUser.Profile.Login));
                result = true;
            }
            catch (Exception ex)
            {
                _logger.Error(string.Format("Error deactivating Okta user. Okta username: {0}.", oktaUser.Profile.Login), ex);
            }

            return(result);
        }