DESCRIPTION
This script demonstrates how to get user account properties (for example, sAMAccountName) in onPostDelete() handler.
Note This code may use functions from the Active Roles Script Policy Best Practices. Please, follow the link to obtain instructions and code for those functions.
SCRIPT
'*********************************************************************************
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
' WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
'
' IF YOU WANT THIS FUNCTIONALITY TO BE CONDITIONALLY SUPPORTED,
' PLEASE CONTACT ONE IDENTITY PROFESSIONAL SERVICES.
'*********************************************************************************
Sub onPreDelete(Request)
'---- get sAMAccountName attribute from deleting user account ----
strSAMAccountName = DirObj.Get("sAMAccountName")
'---- store it in "my-control-1" ----
Request.PutOutControl "my-control-1", ADSTYPE_CASE_IGNORE_STRING, strSAMAccountName
End Sub
Sub onPostDelete(Request)
'---- get stored sAMAccountName form "my-control-1" ----
strSAMAccountName = Request.GetOutControl("my-control-1")
End Sub
'***** END OF CODE ***************************************************************