Environment
Situation
Issue
Customer SSO enabled an application and wanted to prevent users from cancelling the ChangePassword using the OnException command. The section of the application definition that handles password change is similar to the one below;
#=====================================================================#
# Change Password Prompt #
# If the user cancels, call a sub routine to force them to change it #
#=====================================================================#
Dialog Class ""#32770""
Title ""Change Password""
EndDialog
Type $Username #1015
Type $Password #1004
OnException ChangePasswordCancelled
Call ChangePasswordForce
ChangePassword ?NewPwd ""Please enter a new password for the Finance application.""
Type ?NewPwd #1005
Type ?NewPwd #1006
Click #1
ClearException
ChangePasswordCancelled
#========================================================#
# Change successful, save the password to the Directory #
#========================================================#
Dialog
Class ""#32770""
Title ""Change Successful""
EndDialog
Click #2
Set $Password ?NewPwd
When they ran the application it logged on via SSO. However, when the password expired and the user was prompted by SecureLogin to enter a new one, if the user clicked cancel on the SecureLogin Change Password box, the following error appeared;
BROKER_SUBROUTINE_NOT_DEFINED (-321): Error executing line xx of script (Finance.Exe)
Resolution
Cause
If the SSO administrator implements the command;
OnException ChangePasswordCancelled Call ChangePasswordForce
If the user clicks cancel on the SecureLogin Change Password prompt, the application definition (formerly called script) looks for the ChangePasswordForce sub routine.
The SSO administrator had referred to a sub routine called ChangePasswordForce but had not created it.
Solution
The SSO administrator added the following sub routine to the bottom of the application definition (it can appear anywhere but for flow ActivIdentity Professional Services recommend the top or bottom).
Sub ChangePasswordForce
MessageBox ""For security reasons, you cannot cancel this process.""
ChangePassword ?NewPwd ""Please enter a new password for the Finance application.""
Type ?NewPwd #1005 T
ype ?NewPwd #1006
Click #1
ClearException ChangePasswordCancelled
EndSub