0 votes

Hello Adaxes team,

We experienced a problem this week-end with a scheduled task that rely on AccountExpires field.
It check the property in that way :
if 'Account Expires' property is less than equal to '%datetime,+2d%' then .....

The goal is to disable account when expiration date is over for two days. Of course i don't want account with no expiration date to be included. So i checked this task with few accounts first with no problem.
And this weekend many accounts with no expiration date had been disabled !

The problem is that according to MSDN, the AccountExpires property can be either 0 or 0x7FFFFFFFFFFFFFFF if there is no expiration.
And it seems that Adaxes handles correctly 0x7FFFFFFFFFFFFFFF value but not 0.
It's obviously a problem for me as the comparison is quite explicit and we have no way in AD to set 0 or 0x7FFFFFFFFFFFFFFF explicitely when using standard admin tools (and i still don't understand why there is two different values for the same thing but that's another story).

That should be corrected in my opinion, i'm waiting for yours

Regards

Stephen

by (800 points)

1 Answer

0 votes
by (18.0k points)

Hello Stephen,

In order to check the expiration date of a user account, I suggest you use the If account/password <expiration status> condition:

0

Mmmm yes it makes sense in my particular example.

But what if i want to make complex validation such as expiration date between two dates (if accountExpires gt Date + 1 month and lt Date + 2 month) ?
In that case, i'm stuck with that right ? And i will encounter the same issue.

Thanks for your help

0

Stephen,

If the If account/password <expiration status> condition doesn't work for you, and you want to check the account expiration date, you need to add If the 'Account Expires' property does not equal 'unspecified' condition:

2012.1 will introduce the Script Condition that can be used for complex scenarios.

0

I missed that. Thanks !

Related questions

0 votes
1 answer

I have an HTML email being sent via Powershell to new users that have useful information in it like Phones numbers, email address and I wanted to add the Manager field. I put ... want to display the name like Manager: Steve Rogers. Is there a way to do that?

asked Aug 8, 2019 by hgletifer (1.3k points)
0 votes
0 answers

All of full time employees have an employee ID, the issue I have is trying to display the employee ID field in a web portal page. I have both the employee ID and ... have a value displayed in the employee ID field. your assistance would be very helpful. Tony

asked Jul 15, 2015 by babbeaw (320 points)
0 votes
1 answer

I am upgrading to version 2013-2 and I have found an issue with default field values. I'm hoping you can assist me with this. Web Filtering Level is associated ... recognized: Also note that one of the custom fields hints data bleeds into the field value.

asked Dec 12, 2013 by BradG (950 points)
0 votes
1 answer

I'm creating a business rule to identify active non-employee accounts (sub contractors, temps, etc). These employees are members of a special group. I have created two ... as well. Is there anyway to make the exclusion rule 'override' the inclusion rule?

asked Aug 27, 2015 by ashmite (510 points)
0 votes
0 answers

Hello We are using the REST API with the Business Unit method to get all our users in once, and it works really well, the API return around 150 in a second when ... proper way with Adaxes REST API to read the current expiration time for all accounts? Thanks

asked Jun 25, 2022 by ygini (240 points)
3,589 questions
3,278 answers
8,303 comments
548,130 users