GetPrivByGroups Method
- Last UpdatedNov 06, 2025
- 1 minute read
The GetPrivByGroups() method accepts a list of SIDs that represent the OS groups to which the user belongs and optionally a privilege ID. It looks up the SIDs in the Grp_Name table and returns the maximum value in the Grp_Priv_Link table for the groups that match the supplied SIDs. If none of the SIDs match a group, then 0 is returned for the priv_value. If a priv_id is supplied, then a single row for that privilege is returned. Otherwise, a row for each privilege is returned.
'Declaration
Public Shared Function GetPrivByGroups( _
ByVal securityIds() As String, _
ByVal privilegeId As Nullable(Of Integer) _
) As DataSet
'Usage
Dim securityIds() As String
Dim privilegeId As Nullable(Of Integer)
Dim value As DataSet
value = GrpPrivLink.GetPrivByGroups(securityIds, privilegeId)
public static DataSet GetPrivByGroups(
string[] securityIds,
Nullable<int> privilegeId
)
Parameters
- securityIds
- Required. Holds an array of SIDs that represent the OS groups to which the user belongs.
- privilegeId
- Optional. Holds the ID of the privilege.
Return Value
Returns a DataSet that contains the list of privileges of the OS groups matching the supplied SIDs. If no data found, an empty DataSet is returned.
The columns of the returned DataSet are described below.
|
Column Name |
Description |
|---|---|
|
priv_id |
An integer that is the ID of the privilege from the grp_priv_link.priv_id column linked to the group. |
|
priv_value |
An integer that is the privilege value for the group. |