Skip to main content

Add Group To Role

Add a user group to a role definition in RSA Governance & Lifecycle.

POST https://instance.securid.com/aveksa/command.submit?cmd=addGroupToRole

Purpose​

The addGroupToRole command adds a specified User Group ID to a specified Role ID. This command requires a POST request where parameters are supplied as URL query parameters rather than in the HTTP request body.

Request​

Parameters​

ParameterTypeRequirementDescription
cmdstringCommand name: addGroupToRole.
groupIdintegerThe ID of the user group to add to the role.
roleIdintegerThe ID of the role to which the group is added.
formatstringOptionalThe response format:

properties: (Default) Key-value format (key=value). If multiple objects return, values are comma-separated.

json: JavaScript Object Notation format. Suitable for programmatic parsing.
tokenstringDeprecatedSession token retrieved from loginUser. Deprecated. Use the Authorization request header instead.

Request Headers​

HeaderTypeRequirementDescription
AuthorizationstringBearer token for a user with system administrator privileges, obtained via loginUser. Format: Bearer <token>.
AcceptstringOptionalDesired response MIME type (for example, application/json or text/plain).
Content-TypestringOptionalContent type header: application/x-www-form-urlencoded or application/json.
note

The Authorization request header replaces the deprecated token URL query parameter.

Token Type Requirement

Role management commands currently require an authenticated user session token obtained via loginUser with the Role Administrator capability. While the Web Services Administration console allows mapping Role commands to a Trusted Application, requests using a Trusted Application token (loginTrustedApp) currently return HTTP 403 (Couldn't perform edit action on role).

Response​

Parameters​

ParameterTypeDescription
statusstringExecution result: success or failure.
messagestringOptional status or error diagnostic message returned by the server.

Examples​

Request​

curl -X POST \
"https://instance.securid.com/aveksa/command.submit?cmd=addGroupToRole&groupId=2&roleId=3&format=json" \
-H "Authorization: Bearer <user-token>" \
-H "Accept: application/json"

Response​

JSON Format (format=json):

{
"status": "success",
"message": "Group 2 successfully added to role 3."
}

Properties Format (format=properties):

status=success
message=Group 2 successfully added to role 3.

Verified with RSA Governance & Lifecycle version 8.0.0.

References​