Hi,
We need to generate unique samaccountname using rule for AD source. For uniqueness I want to use the below sample code for identity now but not getting how to modify it for identitynow instead of identityiq.
public boolean isUnique ( String username ) throws GeneralException {
QueryOptions ops = new QueryOptions();
ops.addFilter( Filter.ignoreCase( Filter.eq( “uid”, username ) ) );
ops.addFilter( Filter.eq( “application”, application ) );
int numberFound = context.countObjects( Link.class, ops );
return numberFound == 0;
}
Here the application filter needs to replaced with source filter. Kindly let me know how to do this.
Regards,
Mahesh