DESCRIPTION
This script will log the user name (in the form domain\samAccountName) of the user who performs a deprovision against a target user object. This information is stored in the description attribute of the deprovisioned target user object.
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 onDeprovision(Request)
On Error Resume Next
DirObj.GetInfo
strOldDesc = DirObj.Get("description")
Set Session = Security.Sessions.Current
strDate = CStr(Date)
strDepro = "[Deprovisioned by " & Session.UserName & " on " & strDate & "] " & strOldDesc
DirObj.Put "description", strDepro
DirObj.SetInfo
Set Session = Nothing
End Sub
'***** END OF CODE ***************************************************************