Unable to Filter Foreign Exports Based on Object Class (280046)



The information in this article applies to:

  • Microsoft Metadirectory Services 2.1
  • Microsoft Metadirectory Services 2.2

This article was previously published under Q280046

SYMPTOMS

When you attempt to process Foreign Users with a Management Agent (MA), you may want to filter or include or exclude the entries in the Microsoft Metadirectory Services (MMS), based on object class.

You cannot use the following functions to read the ObjectClass attribute:
  • $Embedded()

    and/or
  • $Multivalued()
For more information about these two functions, see the "Management Agent Functions" section in Appendix D of the MMS Management Agent Toolkit online documentation.

CAUSE

This behavior can occur if MMS stores the ObjectClass attribute differently than other Metadirectory attributes. When you attempt to read the ObjectClass attribute of a Metadirectory entry, you must use the special function, $MV_Object_Class(). This function has been designed for this specific purpose.

RESOLUTION

The $MV_Object_Class() function allows you to read the ObjectClass attribute of an entry, and allows you to filter the entry based on your Inclusion/Exclustion rules. For details on how to use the Inclusion/Exclusion templates, see the section, "Other Management Agent Components -Inclusion and Exclusion Filters" in the MMS Management Agent Toolkit 4 online documentation.

MORE INFORMATION

The parameters for using this function are simple, and the following information explains how to use it.

$MV_OBJECT_CLASS()

Function

Determines whether a metaverse entry is a member of a particular object class.

Syntax

$MV_OBJECT_CLASS("object class")=TRUE/FALSE

Parameters

Object class is the name of the object class to be checked for.

Comments

Object class is a multivalued attribute as an object might be a member of many classes at the same time. This function allows you to check for a specific object class. It is used in attribute flow rules to restrict assignments to only certain kinds of entries.

Examples

IF $MV_OBJECT_CLASS("Person") = TRUE THEN 
  $cd.mail = $mv.mail 
ENDIF
				
In addition, in this example you want to export everyone in the Metadirectory to your Microsoft Exchange Server 5.5 mail system as Custom Recipients (Foreign Users in other MAs). However, you want to exclude temporary employees as Custom Recipients based on object class. The MMS Administrator configures a special object class for temporary employees called TempPerson. In the directory, the object class appears as:

objectClass
[ 1] TempPerson
[ 2] person
[ 3] Top

To view the object class of a user using MMS Compass, right-click on the user, click View, and then click View all attributes.

The following example assumes that you already have a properly configured Exchange 5.5 MAPI MA. To configure this MA to exclude temporary employees from being exported as Custom Recipients, follow these steps:
  1. Open the Exchange MA, click Configure MA, click Inclusions and Exclusions, and then click Foreign Entries.
  2. Click the Exclusions template.
  3. Scroll down, add the following filter rule
       Message 302
       $MV_OBJECT_CLASS("TempPerson") = TRUE
    						
    and then click OK.
  4. Click Operate MA, click Operational Settings, and then click Logging.
  5. Set the Logging Detail Level to 2, which allows you to see the message number in the logs.
  6. Click Run the Management Agent.
  7. Check the logs for the successful exclusions. Within the body of the log, a detailed entry describes the activities of the MA on an item-by-item basis:
    0099-EXCLUDED[302]: cn=Peter Lee,dc=testdom,dc=com
    						
    This message translates into the fact that record number "99" was excluded by rule number "302" because the object Peter Lee contained a value of TempPerson in its object class attribute.

    The summary at the bottom of the log reports how many were excluded:
    Number of record(s) excluded: 1
    					

Modification Type:MinorLast Reviewed:1/25/2006
Keywords:kbenv kbprb KB280046