This documentation is archived and is not being maintained.

SetByTemplate Method

Exchange Server 2003

SetByTemplate Method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Provides the ability to bit-wise OR the masks of the DACL object, according to a specified DACL template name and entity name.

Applies To


objResult  objDACL.SetByTemplate(strNT4NameobjDACLTemplatestrNT4NameInDACLTemplate);


A string value of the domain and username of a security principal.
A DACL object used as a template.
A string value of the name of an entity in the DACL template object used to compare with the DACL object being evaluated.

Return Value

An object that returns error codes and descriptions.


This method is the same as the ModifyByTemplate method, except that the only action taken is to bit-wise OR the masks.

The following possible error messages can be returned:

  • Person not found.
  • Template entity not found.


var objLRoles = DaclLegacyRoles();
var objErr = objDacl.SetByTemplate("MYDOMAIN\\User1", objLRoles, "Reviewer");
   //something went wrong

See Also

ClearByTemplate Method

MakeEqualToTemplate Method

ModifyByTemplate Method

DACL Templates