Summary: You can configure Output section of Suspend User web action so that when a user account is suspended user manager will get a notification message.
This article explains how to configure this scenario.
Applies to: Cayosoft Administrator 6.0.0 or later
ID: KB20190904-1
Note: You can add to the email subject and message any user property value in the following format: $($FoundObject.<AD User Property>), where <AD User Property> is the LDAP name of the user property. For example: $($FoundObject.DisplayName).
To notify a suspended users manager when a user account is suspended, you should do the following:
- Navigate to Web Actions
- Click Active Directory > Suspend User web action
- Click Change Output Type and select Send as E-mail with attached report
- Click OK
- Add this code into To field: $(GetMailPropertyByDn -ObjectDN $FoundObject.manager)
- Add this code into Message field:
{
$managerName = "Manager"
if($FoundObject.manager -ne $Null){
$mgr = Get-ADUser -Identity $FoundObject.manager -Properties * -ErrorAction Ignore
if($mgr -ne $Null){
$managerName = $mgr.DisplayName
}
}$message =
"
Dear $managerName<br/><br/>
This account was suspended: $($FoundObject.givenName) $($FoundObject.sn).<br/><br/>User home directory: $($FoundObject.homeDirectory)<br/>
"$message
}.InvokeReturnAsIs() - Save changes
For more details, please see Customizing an automation rule or web action output email article.
Comments
0 comments
Please sign in to leave a comment.