win32security.CheckTokenMembership

bool = CheckTokenMembership(TokenHandle, SidToCheck )

Checks if a SID is enabled in a token

Parameters

TokenHandle : PyHANDLE

Handle to an access token, current process token used if None

SidToCheck : PySID

Sid to be checked for presence in token