0 votes

Good afternoon,

I am attempting to create a report to flag Users where the email address in AD does not match the email address in our Payroll system.

I am able to use a program provided by the Payroll system to sync the email address from our Payroll system in to the AD propery of 'extensionAttribute15'.

The problem comes up when I attempt to set a Search Option with the following: If 'Extension Attribute 15' does not equal '%mail%'

When I run the report I get an error message of: Resolving value references in the condition value '%mail%' resulted in an empty string.

It then returns no matches even though I know there are some. I get the same result if I use equal instead of does not equal.

The repot seems like it can read the property since I can use a Equal with a manually input email address, just not when I compare the two fields.

For example the following are both sucessful matches:

  • Extension Attribute 15 equals/does not equal 'user@email.com'
  • Email equals/does not equal 'user@email.com'

Both fields are case in-senstive strings of 25 so should match but there must be something I'm missing.

Report Scope is: Look in - Objects in a specific AD Location set to Users OU. Report Search Filter is: (sAMAccountType=805306368) to grab User objects.

Any help or input would be greatly appreciated.

Thank you, Keith

by (20 points)
0

Hello Keith,

The behavior occurs because the %mail% value reference resolves into an empty value. Also, in report conditions value references resolve for the property values of the user who is generating the report, not for the users to be included into the report. For us to suggest a solution, please, specify whether users with empty Extension Attribute 15 or Email property should be included into the report. Also, should users with both properties being empty be included into the report?

Any additional details will be much appreciated.

0

Good morning,

I did not realize it resolved to the field for the user running the report but that would definltey make sense based on the user I'm running it as. Thank you.

For this particular report, I would need to include the following two groups of users:

Users with a blank Extension Attribute 15

and

Users with a value in Extension Attribute 15 that does not match the users Email property

I do not believe we need to check for a blank Email or for both being blank. To be included in the OU this report is pulling from users would need to have an Email property already so it should never be blank.

If by some chance Email is blank, I think those two rules would still catch that as well. If the user never had an Email, then Extension Attribute 15 would also be blank since it could not sync the value from Payroll. If Email was somehow cleared later after a sync, then the value previously synced to Extension Attritubte 15 would no longer match so would also be included. Does that sound correct?

Thank you very much for your help. Keith

1 Answer

0 votes
by (211k points)

Hello Keith,

Thank you for the provided details. To achieve the desired, do the following:

  1. Launch Adaxes Administration console.
  2. In the Console Tree, expand Reports.
  3. Navigate to ad right-click your report.
  4. In the context menu, click Edit.
  5. Activate the Search Options tab.
  6. In the Search filter field, enter the following: *(&(sAMAccountType=805306368)(mail=))** image.png
  7. Make sure that the option for the report conditions is set to Include (click Exclude if set).
  8. Click Add Condition. image.png
  9. Select If PowerShell script returns true.
  10. Paste the below script into the Script field.
# Get extension attribute
try
{
    $extensionAttribute = $Context.TargetObject.Get("extensionAttribute15")
}
catch
{
    $Context.ConditionIsMet = $True
    return
}

$Context.ConditionIsMet = $Context.TargetObject.Get("mail") -ne $extensionAttribute
  1. Enter a short description. image.png
  2. Click OK twice.
0

Thank you very much. That worked perfectly.

Related questions

0 votes
1 answer

I'm currently receiving the below error when trying to remove or add actions to a web interface's homepage. I only get the error on this specific dashboard, others are ... the web interface there. I'm currently running Adaxes version 2021.1 if that helps

asked May 21 by richarddewis (220 points)
0 votes
1 answer

Hi, we're receiving the below error when trying to add SMTP addresses to Office365 mailboxes from Adaxes. I've raised a ticket with support, but thought I'd ask ... , please see exception members for more information. Any help would be great. Thanks Gary

asked May 29, 2020 by gazoco (390 points)
0 votes
1 answer

Hi again- When I attempt to test the deprovision command, I get the msg "the specified custom command doesn't exist". Can't seem to figure this out. Initially I ... the security roles and "execute custom commands" is enabled. I also restored to Initial state.

asked Oct 1, 2013 by MeliOnTheJob (1.7k points)
0 votes
1 answer

Hello, I am trying to figure out how to create a scheduled task via PowerShell. I've been referencing the SDK, mostly pulling script examples straight out of it. After following the steps on ... ==================> # Save the Scheduled Task $task.SetInfo()

asked Feb 23, 2015 by DFassett (700 points)
0 votes
1 answer

Trying to create a new group and getting the following error: "The name reference is invalid. (Server: example.com)" I've created groups before...the problem seems to have just ... a new Group object. It has me puzzled so I'm looking for some direction...

asked Feb 28, 2014 by RickWaukCo (300 points)
2,608 questions
2,346 answers
6,232 comments
864,254 users