다음을 통해 공유


SearchForIndexBySID Method

Topic Last Modified: 2006-06-13

Returns the index of an entity in a DACL object by a specified SID.

Applies To

DACL Object

Syntax


ndxEntity  objDACL.SearchForIndexBySID(strSID);

Parameters

  • strSID
    A string value of the name of the security identifier such as "S-1-1-0".

Return Value

A long value of the entity s index. This method returns a negative number if the entity is not found.

Remarks

If there is more than one entity in the DACL with the same SID, this method only returns one object of the first match.

Indexes are zero-based.

Example

var index = objDacl.SearchForIndexBySID("S-1-5-21-1343024091-1060284298-1417001333-1107");
if(index<0){
    //user not found
}