0 votes

Hi all,

I am trying to work out what has happened to our installation of Adaxes, as scheduled deprovisioning has not been working for quite a while.

Previously it was possible to use the 'modify user' section to enter a 'scheduled deprovisioning date', which would then run the deprovision task on that date.

I don't recall specifically when it stopped working. I have tried checking what the 'modify user' section of the web console does, but it does not appear to be possible to change.

Currently the task is set to run against an unknown OU (the 5EDE OU shown here:) Screenshot 2022-04-21 .png

The script "Check Deprovision date" is as follows:

$dateAttribute = "adm-CustomAttributeDate3" # TODO: modify me

$Context.ConditionIsMet = $False

try
{
    $decomissionDate = $Context.GetModifiedPropertyValue($dateAttribute)
}
catch
{
    return # No decomissioning date specified
}

$currentDate = [System.DateTime]::Now
if ($decomissionDate -le $currentDate)
{
    $Context.ConditionIsMet = $True
}

I have tried adding a test office OU to the 'assigned over' section, however even when I set the 'deprovision date' in the 'Modify user' section of the web console to be a later date, it will execute the deprovision command 100% of the time when I run the script (so I presume it is returning true 100% of the time?)

Any input is appreciated!

by (180 points)

1 Answer

0 votes
by (233k points)

Hello,

Currently the task is set to run against an unknown OU (the 5EDE OU shown here:)

This can happen, for example, if the OU got deleted. You can safely remove the item from the Activity Scope of the scheduled task and add required ones.

I have tried checking what the 'modify user' section of the web console does, but it does not appear to be possible to change.

As we understand, Modify User is a Web interface action you execute right from the home page. If that is correct, have a look at the following tutorial: https://www.adaxes.com/tutorials_WebInterfaceCustomization_ConfigureActionsPane.htm.

The script "Check Deprovision date" is as follows:

The script is wrong and will never work as desired. If you are using Adaxes version 2021.1, no scripts are required. You can use the If <property> <relation> <value> condition as follows: image.png If you are using an older version, here is the script that will do the trick:

$property = "adm-CustomAttributeDate3" # TODO: modify me

# Get attribute value
try
{
    $compareDate = $Context.TargetObject.Get($property)    
}
catch
{
    $Context.ConditionIsMet = $False
    return
}

# Compare dates
$currentDate = [System.DateTime]::UtcNow
$Context.ConditionIsMet = $compareDate.Date -eq $currentDate.Date

For details on how to check the version of Adaxes you are using, have a look at the following help article: https://www.adaxes.com/help/CheckServiceVersion.

Related questions

0 votes
1 answer

In Web Configuration, under advanced section we have set the Iddle Sessiom time out limit to 20 minutes and also the Authentication idle time out limit to 20 minutes, however ... there is any other way we can enforce re-login after session times out ? Thanks

asked Feb 13, 2021 by rsaran (70 points)
0 votes
1 answer

I am trying to send a $context.logmessage from a condition script in a Scheduled Task but I get nothing in the log. Is this not possible? Morten A. Steien

asked Jul 20, 2020 by Morten A. Steien (150 points)
0 votes
1 answer

We get the following error when attempting to edit a room or equipment mailbox in the web interface. We can edit them using the admin console. I am a full Adaxes Admin so I don't think permissions. I also don't see an error in the logs.

asked Dec 9, 2020 by mark.it.admin (2.1k points)
0 votes
1 answer

I'm testing making changes to a mailbox that is synced between AD and Office365. During changes updates are not reflected back. I'm prompted that the replication with AD Connect has ... in the web interface. If I go to the console I can see the change.

asked Aug 6, 2020 by ComputerHabit (790 points)
0 votes
1 answer

I am evaluating Adaxes. I noticed that the web interface does not allow modification of the External Email Address (ms-Exch-Target-Address). What would someone do if they needed to change the Target Address?

asked Aug 6, 2020 by ComputerHabit (790 points)
2,884 questions
2,604 answers
6,762 comments
119,181 users