Published: 06/06/2018
Applies to: Cayosoft Administrator 5.X or later.
Summary: Every Cayosoft Administrator rule and web action can send execution results in email, so you can get rule output in a convenient friendly view. Cayosoft Administrator provides two types of email: Report and Alert. The difference between them is that Report always contains a table with rule results, and Alert has only a text specified in a Message setting and does not contain such a table.
When provisioning new user accounts in Web Interface by New User action, such output emails can be very useful. You can customize these emails and include some welcome message for a new user.
Customizing email in the 'New User' web action
In this example we will configure New User action so it will send an alert message to a new user's manager, and include new user logon information into email body:
- In Administrator Console navigate to Web Portal
- Click Web Actions > Active Directory > New User
- In Output section, click on Change Output Type link and select Send E-mail Alert option.
- Click OK
- Set CC: field to: (GetMailPropertyByDn $ManagerObjectID)
Note: we recommend to use "CC:" field instead of replacing default "To:" value because if you don't set Manager on New User form when creating an account, the message won't be sent and the New User command execution result will show an error message on the Web UI Results screen. - Replace default alert message by this one:
{
$header = "New user created<br/><br/>"$body = "Full name: $Fullname<br/>
Logon name: $SamAccountNameDomain$samGenerated<br/>
Email: $mailtoset<br/>
Password: $pwdToSet<br/>"$message = $header + $body
$message
}.InvokeReturnAsIs() - Click Save Changes
As a result, when a new user is created in Web UI, his manager will receive the following email:
Tokens, that can be used in New User email output message
Token |
Description |
$SamAccountNameDomain |
Domain part of the user logon name |
$samGenerated |
User logon name (SamAccountName) |
$UserPrincipalNameGenerated |
User Principal Name |
$GivenName |
First Name |
$Surname |
Last Name |
$Initials |
Initials |
$FullName |
Full Name |
$disGenerated |
Display Name |
$Description |
Description |
$mailtoset |
Email Address |
$pwdToSet |
Password |
$ChangePasswordAtNextLogon |
Change password at first logon |
$PasswordNeverExpires |
Password never expires |
$CannotChangePassword |
User cannot changed password |
$AccountIsDisabled |
Account is disabled |
$Title |
Job Title |
$Department |
Department |
$Office |
Office |
$CustomAttr1 ($CustomAttr2, $CustomAttr3, etc) |
Custom attribute 1-15, if they are configured in the Other Attributes section of the New User rule |
$Ticket |
Ticket |
$(($FoundObject.PwdExpires-$(get-date)).Days) |
Number of days before password expires. |
Related Articles
How to customize font in Cayosoft Output E-mail
How to customize Notify Manager email in bulk provisioning rules
Comments
0 comments
Please sign in to leave a comment.