Microsoft KB Archive/280046

= Unable to Filter Foreign Exports Based on Object Class =

Article ID: 280046

Article Last Modified on 1/25/2006

-

APPLIES TO


 * Microsoft Metadirectory Services 2.1
 * Microsoft Metadirectory Services 2.2 Service Pack 1

-



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 &quot;Management Agent Functions&quot; 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, &quot;Other Management Agent Components -Inclusion and Exclusion Filters&quot; 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.

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

Syntax
$MV_OBJECT_CLASS(&quot;object class&quot;)=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(&quot;Person&quot;) = 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:  Open the Exchange MA, click Configure MA, click Inclusions and Exclusions, and then click Foreign Entries. Click the Exclusions template.  Scroll down, add the following filter rule   Message 302 $MV_OBJECT_CLASS(&quot;TempPerson&quot;) = TRUE and then click OK.  Click Operate MA, click Operational Settings, and then click Logging. Set the Logging Detail Level to 2, which allows you to see the message number in the logs.</li> Click Run the Management Agent.</li>  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 &quot;99&quot; was excluded by rule number &quot;302&quot; 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 </li></ol>

Keywords: kbenv kbprb KB280046

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.