IAuditSecurity Method: IsAuditSet

 Trustee As String,
 AuditPermissions As String
) As Variant_Boolean;


[in] String Trustee
Name of a User or Group name for whom auditing is to be checked.

[in] String AuditPermissions
Audit permissions to be checked. Refer Access Permissions for a complete list of audit permissions for a securable object.

Checks if the given user or group has the specified audit permissions. The function also checks for indirect access. This includes access to the Trustee's global groups (of the current PDC) and local groups (of the user specified machine).

Return Values

TRUE if the trustee has the audit permissions specified in the AccessPermissions parameter; FALSE otherwise.


Dim AuditSec As IAuditSecurity
Set AuditSec= CreateObject("DirectScript.ObjectSecurity")
'Read the auditing information of the file c:\test.txt
AuditSec.AttachFile "c:\test.txt
'Check if the user "John" has success and failure to Write "W-W" audit set for him
Debug.Print AuditSec.IsAuditSet ("John", "W-W")


See Also