In the Active Roles Console, perform the following actions:
Note: No other attributes need to be defined. The remaining values are generated during the mail-enable process in the background
Once the policy has been created, apply it to the OU or Domain where the accounts are to be mail-enabled upon creation.
Alternatively, you can use the following Powershell script:
function generateMailNickname($Request){
{
$FirstName = $Request.Get("givenName")
$LastName = $Request.Get("sn")
$Suffix = "mail"
$mailNickname = $FirstName + $LastName + "." + $Suffix
return $mailNickname
}
function onGetEffectivePolicy($Request)
{
$mailNickname = generateMailNickname Request
$Request.SetEffectivePolicyInfo("mailNickname", $Constants.EDS_EPI_UI_GENERATED_VALUE, $mailNickname)
}
function onPostCreate($Request)
{
if (-not ($Request.Get("edsaCreateMsExchMailbox"))){
$extMailDomain = "google.com"
if ($Request.Get("mailNickname")){
$mailNickname = $Request.Get("mailNickname") } else {
$mailNickname = generateMailNickname $Request
}
$targetAddress = "SMTP:" + $mailNickname + "@" + $extMailDomain
Set-QADUser -Identity ($Request.Get("distinguishedName")) -ObjectAttributes @{
mailNickname=$mailNickname;
targetAddress=$targetAddress;
edsaEstablishEmail=$true;
"edsva-MsExch-ApplyEmailAddressPolicy"=$true
}
}
}
© 2025 One Identity LLC. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center