Showing posts with label filter. Show all posts
Showing posts with label filter. Show all posts

Thursday, February 19, 2015

Get AD account expiring in next 30days

Use below code snippet to find list of AD account expiring in next 30days:

GregorianCalendar Win32Epoch = new GregorianCalendar(1601,Calendar.JANUARY,1);

Date Win32EpochDate = Win32Epoch.getTime();

//Note that 1/1/1601 will be returned as a negative value by Java

GregorianCalendar Today = new GregorianCalendar();

Date TodaysDate = Today.getTime();

long TimeSinceWin32Epoch = 10000 * (TodaysDate.getTime() - Win32EpochDate.getTime());

 

Calendar c=new GregorianCalendar();

c.add(Calendar.DATE, 30);

Date dateAfter30Days=c.getTime();

long TimeAfter30DaysSinceWin32Epoch = 10000 * (dateAfter30Days.getTime() - Win32EpochDate.getTime());

 

searchFilter = "(&(objectClass=User)(accountExpires>=" + TimeSinceWin32Epoch + ")(accountExpires<="+ TimeAfter30DaysSinceWin32Epoch+"))";   

 


Wednesday, September 25, 2013

msExchVersion Attribute not supported by OIM Exchange Connector 11.1.1.6.0

While checking the forums, I came across this post where the author was trying to run the target reconciliation using msExchVersion attribute in search filter. The author has OIM 11g BP07 and was using OIM - Exchange Connector 11.1.1.6.0. The environment has multiple version of Exchange Servers i.e., 2007 & 2003.

Just for little background, Exchange 2007 introduced a new user attribute called msExchVersion that tracks the Exchange version a mailbox is created on. This may be useful if you want to manage mailboxes by Exchange version.
Exchange 2003 and earlier = ""
Exchange 2007  = "4535486012416"
Exchange 2010 = "44220983382016"

 
After reading the connector 11.1.1.6.0 documentation, I came to know that only specific attributes can be used in search filter for running limited reconciliation. (Refer Page 75). Here is the list:

The following attributes are supported in the filters:
  • ArchiveQuota
  • ProhibitSendQuota
  • ArchiveWarningQuota
  • Database
  • IssueWarningQuota
  • ProhibitSendQuota
  • ProhibitSendReceiveQuota
  • UseDatabaseQuotaDefaults
  • ExternalEmailAddress
  • DisplayName
  • SimpleDisplayName
  • EmailAddressPolicyEnabled
  • HiddenFromAddressListsEnabled
  • MaxSendSize
  • MaxReceiveSize
  • Name
  • Alias
  • PrimarySmtpAddress
  • RecipientLimits
  • RecipientType
  • WhenChanged
  • CustomAttribute1, CustomAttribute2, and so on up to CustomAttribute15

However, the 11.1.1.5.0 and 9.1.1.7 doesn't specifically mention any list of attributes that can be used in search filter in reconciliation task. So, I think in environment with mixed version of Exchange servers, these two version should be used. 
 
References:
 
  • https://forums.oracle.com/thread/2586016
  • Exchange Reconciliation For Environments With Mixed 2003 and 2007/2010 Servers (Doc ID 1463160.1)
  • Patch 13778888: RELEASE VEHICLE FOR EXCHANGE CONNECTOR 11.1.1.5.0
  • Patch 17198005: RELEASE VEHICLE FOR EXCHANGE CONNECTOR 11.1.1.6.0