GroupPrivilege_Get (Get)
- Last UpdatedNov 06, 2025
- 2 minute read
| Get | GroupPrivilege_Get |
Resource Path:/api/GroupPrivilege
| Name | Description | Data Type |
|---|---|---|
| userId | Required. The user ID (domain and username) of the target user. If MES OS User or OS Group security mode is being used, this is the Windows user account username. | string |
| privId | Required. The ID of the target privilege. | integer |
To get the value for privilege 5 for the user tad.smith:
api/GroupPrivilege?userId=tad.smith&privId=5
To get the privilege value for a Windows AD user account, with a domain and username, the user ID has to be encoded using endcodeURIComponent() before being assigned to the userId parameter.
Example: Work Tasks Lookups
To get the value for a privilege for a user:
api/GroupPrivilege?userId={userId}&privId={privId}
To get the privilege value, the user ID has to be passed through an endcodeURIComponent() in the JavaScript and then sent to the API. So, in Enterprise Console, you would set up the user as:
api/user/{userId}
Then in the script in Enterprise Console, you would set:
{userId} = endcodeURIComponent(ourorgdomain\tad.smith)
Returns the privilege value.
- If the value is 0, the user has not been assigned that privilege. That is, none of the user groups of which the user is a member has been assigned that privilege.
- If the value is not 0, the user has been assigned that privilege. That is, the user is a member of a user group that has been assigned that privilege. The value will be the highest privilege value of all the user groups of which the user is a member.