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 (200 points)

1 Answer

0 votes
by (287k 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 (300 points)
0 votes
1 answer

I'm lost as to why "Create User" doesn't show up. I made a new dashboard, mirroring the default Help Desk. Under Actions, I enabled Create User. On the web interface, the option to create a user is not showing. Am I missing a step?

asked May 15 by tromanko (330 points)
0 votes
1 answer

I added a chart based on report "soon-to-expire passwords" to the homepage. In Adaxes console, it will show a chart with time/date of when the password will expire. In the ... the report in web interface, it will show data but the chart will still be blank.

asked Mar 20 by tromanko (330 points)
0 votes
1 answer

Hi I have create a business unit located in Business Units --Test BU's ----FTE Accounts Then I have created a Security Role called Test User Management with me as ... shown at all. I have the headline business units but nothing in there. Thanks Peter Sonander

asked Feb 7, 2023 by Sonander (40 points)
3,528 questions
3,219 answers
8,212 comments
547,651 users