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 (960 points)
edited by

1 Answer

+1 vote
by (3.6k 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

I have a report scheduled to run weekly with the following delivery options: There are 3 recipients on this report. For 2 of these recipients, the report is successfully ... following: But the email is still not delivered to that third recipient. Any thoughts?

asked Aug 21 by msinger (210 points)
0 votes
1 answer

We have business rule attached to "adding member to a group" which tuns powershell script and it was working fine. But (probably after the update to newest 2023 version) script ... the error and that the %member% is clearly empty: How can I fix this please?

asked Feb 15, 2023 by KIT (960 points)
0 votes
0 answers

Here is an example: In Azure the manager shows populated: In Adaxes it shows a blank:

asked Dec 2, 2022 by adaxes_user2 (40 points)
+1 vote
1 answer

Good morning Support, I'm trying to connect to our AzureAD service as specified in the GetAzureAuthAccessToken(String) section ofCloudServices SDK - https://www.adaxes.com/sdk/ ... m working on a process to simply remove users from Cloud groups. Thank you!

asked Dec 3, 2021 by TheOtherBrian (70 points)
0 votes
1 answer

Hi, I need to run a schedule task only if a customattribute is not empty. Can I use ConditionIsMet?

asked Oct 7, 2021 by Simone.Vailati (430 points)
3,552 questions
3,242 answers
8,243 comments
547,828 users