0 votes

Hi, we want to send email notification to managers of empty distribution groups. So I created scheduled task targeted to group and in send action TO, I used '%adm-ManagerEmail%. But this action always end with error "Resolving value references in the notification recipient address '%adm-ManagerEmail%' resulted in an empty string."

Testing group has me as manager. My AD account has E-mail attribute filled.

What could be the problem?

Thanks

by (500 points)
edited by

1 Answer

+1 vote
by (1.9k points)

Hello,

The value reference %adm-ManagerEmail% is not available for group objects. The reason for this is the difference in attribute names. User objects can have a manager and the value is stored in the attribute named Manager. Group objects can have an owner and the value is stored in the attribute named Managed By. As such, attempting to use %adm-ManagerEmail% to retrieve the e-mail of the group owner will resolve in an empty string.

Currently, we don’t have virtual properties for object owners, but we have the feature in our roadmap.

The task you want to accomplish can be done using a PowerShell script. In your Scheduled Task, you will need to replace the Send email notification action with Run a Program or PowerShell Script and use the script below.

In the script:

  • $subject – Specifies the email notification subject.
  • $message – Specifies the email notification text.
$subject = "Notification for the manager of %name% group" # TODO: modify me
$message = "Message Text" # TODO: modify me

# Bind to the group owner
try
{
    $owner = $Context.BindToObjectByDN("%managedBy%")
}
catch
{
    $Context.LogMessage("No owner is specified for the group %name%", "Warning")
    return
}

# Get owner email address
try
{
    $ownerMail = $owner.Get("mail")
}
catch
{
    $Context.LogMessage("No email address is specified for the owner of group %name%", "Warning")
    return
}

# Send mail
$Context.SendMail($ownerMail, $subject, $message, $NULL)

Related questions

0 votes
1 answer

We are attempting to use the member property in a powershell script for all groups. We get this error message on certain groups that are used as "primary". If we set another ... just shows the single member in the group in which the group is not the primary.

asked Feb 19, 2020 by mark.it.admin (1.6k points)
0 votes
1 answer

Is this possible? Example: User A executes a task in Adaxes. That task triggers a mail to another user. That mail needs to have User A as a reply adress.

asked Jun 21, 2019 by kjesoo (960 points)
0 votes
1 answer

In the Exchange Properties we want to set the Retention Policy, but it shows only "[No Policy]" and the list is empty. An Get-RetentionPolicy of Exchange shows: `Get- ... . Do you have any ideas why the list is empty in adaxes? Kind regards, Constantin

asked Mar 30 by Constey (170 points)
0 votes
1 answer

Hi Can you lead us to what we are doing wrong with this report? `$CID ="{ed8afa99-e34d-4531-b69a-0bd0785f4d3a}" $folders = gci -force '\server\Kunden'-ErrorAction ... Value generation = Template, empty. ColumnID is double checked an is the right one. Thanks

asked Mar 5, 2020 by maca (100 points)
0 votes
1 answer

Hi! I need a report of user accounts with empty attributes. Is there a possibility to make such report? Thanks in advance.

asked Sep 11, 2009 by philip (20 points)
2,524 questions
2,269 answers
6,083 comments
503,714 users