Users and Roles Management on the Anomali Platform

Note: To use these endpoints, the Users & Roles Management feature must be enabled for your organization. If you use the legacy ThreatStream interface for user management, refer to User Administration.

The endpoints described below can be used to establish and manage role-based access control on the Anomali platform.

Role Management

Use this endpoint to view, create, assign, update, and delete roles.

Request

/api/v1/user_role/

HTTP Methods: GET/PATCH/POST/DELETE

Get a list of available permissions that can be assigned to a role GET /api/v1/user_role/permissions
Get a list of all roles GET /api/v1/user_role/
Note: This request enables you to view details of all system and custom roles.
Get a list of custom roles GET /api/v1/user_role/?type=user
Get a list of system roles (out-of-the-box roles) GET /api/v1/user_role/?type=legacy

Create a role

(for Org Admins only)

POST /api/v1/user_role/

The request also requires you to specify values for the following properties in the payload:

  • name—Name of the custom role.

  • permissions—Permissions to be included in the custom role.

For example,

Copy
Payload
{
    "name": "test",
    "permissions": ["can_approve_intel", "is_org_admin"]
}

For the list of available permissions that can be added to a role, refer to Anomali Permissions.

Note: The following permissions cannot be included in a custom role: is_readonly, can_use_chat, can_see_api_key. To grant these permissions to users, the corresponding system roles must be assigned. To learn how to view the list of system roles, refer to Using System Roles.

Assign roles to users

(for Org Admins only)

POST /api/v1/user_role/users_set/

This request also requires you to specify values for the following parameters in the payload:

  • users—IDs of the users to whom you want to assign roles.

  • roles—IDs of the roles that you want to assign to the specified users.

For example,

Copy
Payload
{
"users": [39], 
"roles": [3009, 3012]
}
Update a custom role

PATCH /api/v1/user_role/<id>/

where <id> is the ID of the role you want to update.

The request also requires you to specify new values for the following role properties in the payload:

  • name—Name of the custom role (if you want to update a role name).

  • permissions—Permissions to be included in the role (if you want to update a set of permissions of the role).

For the list of available permissions that can be added to a role, refer to Anomali Permissions.

For example,

Copy
Payload
{
    "name": "new_role_name",
    "permissions": ["can_approve_intel"]
}

Delete a role

(for Org Admins only)

DELETE /api/v1/user_role/<id>

where <id> is the ID of the role you want to delete.

Note: System roles cannot be deleted.

Response

A response for the GET /api/v1/user_role/ request includes the objects properties that provide details about roles. The response sample below displays information about the rule_intel_creator role.

Copy
    "objects": [
        {
            "created_ts": "2024-12-12T21:07:51.909567",
            "id": 3011,
            "match_filter": null,
            "max_search_back": null,
            "modified_ts": "2024-12-12T21:15:49.207885",
            "name": "rule_intel_creator",
            "permissions": [
                "can_approve_intel",
                "can_change_rules"
            ],
            "resource_uri": "/api/v1/user_role/3011/",
            "type": "user"
        },
.    ...
.   ]

 

Attribute Description
created_ts Time stamp of when the role was created.
id ID of the role.
match_filter

Eventlog filter applied to the role.

Note: Requires a Security Analytics subscription. If you are a ThreatStream-only user, the parameter is always set to null.
max_search_back

Maximum search back range set for the role.

Note: Requires a Security Analytics subscription. If you are a ThreatStream-only user, the parameter is always set to null.
modified_ts Time stamp of when the role was last modified.
name Name of the role.
permissions Permissions included in the role.

User Management

Use this endpoint to view a list of users and their roles, add users to your organization and assign roles to them. For any other actions that you can take with this endpoint such as unlock a user account or delete a user, refer to User Administration.

Note: Only Organization Administrators can perform these requests.

Request

/api/v1/orgadmin/

HTTP Methods: GET/POST

Get a list of users and roles assigned to them

(for Org Admins only)

GET /api/v1/orgadmin/

Create a user and assign roles

(for Org Admins only)

POST /api/v1/orgadmin/

This request also requires you to specify values for the following parameters in the payload:

  • email—User's email.

  • roles—IDs of the roles that you want to assign to the specified user.

For example,

Copy
Payload
{
    "email": "user@example.com",
    "roles": [3012,9,4]
}

Response

A response for the GET /api/v1/orgadmin/ request includes the objects properties that provide details about users and their roles.

The response sample below displays the details for the test@example.com user.

Copy
{
  "objects": [
    {
      "avatar_s3_url": "",
      "date_joined": "2020-10-27T21:03:25",
      "date_password_changed": null
    },
    {
      "avatar_s3_url": "",
      "date_joined": "2025-05-22T19:23:50",
      "date_password_changed": null,
      "email": "test@example.com",
      "is_active": true,
      "is_locked": false,
      "last_access_ts": "2025-06-25T05:57:31.215305",
      "last_login": "2025-06-25T05:55:06.287563",
      "must_change_password": false,
      "name": "Test",
      "next_password_change_ts": null,
      "nickname": "",
      "resource_uri": "/api/v1/orgadmin/999/",
      "roles": [
        { "id": 12, "name": "Organization Administrator", "type": "legacy" },
        { "id": 7, "name": "API User", "type": "legacy" },
        { "id": 3155, "name": "test role again 2", "type": "user" },
        { "id": 3223, "name": "TopLogSources", "type": "user" },
        { "id": 14, "name": "MFA Exempt", "type": "legacy" }
      ],
      "user_id": "725"
    }
  ]
}

 

Attribute Description
avatar_s3_url Path to the avatar.
date_joined Time stamp of when the user was added to the organization.
date_password_changed Time stamp of when the password was changed.
email Email of the user.
is_active Whether the user account is active or not. If the user is active, the attribute is set to true.
is_locked Whether the user account is locked or not. If the user account is locked, the attribute is set to true.
last_access_ts Time stamp of when the user last accessed the Anomali platform.
last_login Time stamp of when the user last logged in.
must_change_password

Whether the user must change the password. If the user must change the password, the attribute is set to true.

next_password_change_ts Time stamp of when the user will be forced to change their password.
nickname Nickname of the user.
resource_uri The endpoint for the user account.
roles Roles assigned to the user.

Managing SSO Security Group Mappings

Use this endpoint to view, create, update, and delete SSO security group mappings.

Request

/api/v1/ssopermission/

HTTP Methods: GET/POST/PATCH/DELETE

Get a list of SSO security group mappings for a specific identity provider

GET /api/v1/ssopermission/?identity_provider_id=<id>

 

Create an SSO security group mapping POST /api/v1/ssopermission/

This request requires specifying values for following parameters in the payload:

  • group—Name of the security group defined in an identity and access management service such as Microsoft Active Directory, Azure Entra ID, or any SAML 2.0-compliant identity provider (IdP)

  • idp_id—ID of the identity provider.

    Note: To retrieve the ID of your identity provider, send the following request: GET /api/v1/identity-provider/
  • roles—Role to be mapped to the specified SSO security group.

For example,

Copy
Payload
{
    "group": "SecAdminGroup",
    "idp_id": 9,
    "roles": [7]
}
Update an SSO security group mapping

PATCH /api/v1/ssopermission/<id>/

where <id> is the SSO security group ID that you want to change.

This request also requires specifying values for the following parameters in the payload:

  • idp_id—ID of the identity provider

    Note: To retrieve the ID of your identity provider, send the following request: GET /api/v1/identity-provider/
  • roles—Roles that you want to keep for the specified SSO security group.

For example,

Copy
Payload
{
  "idp_id": 9,
  "roles": [7, 3001]
}

Delete an SSO security group mapping

DELETE /api/v1/ssopermission/<id>/

where <id> is the ID of the SSO security group you want to delete.

Response

A response for the GET /api/v1/ssopermission/?identity_provider_id=<id> request includes the objects properties that provide details about SSO security groups and roles to which they are mapped.

The example below displays details for the 8x9x9f9t9w9sdf9pspdfg SSO security group and the roles mapped to it.

Copy
{
  "objects": [
    {
      "group": "8x9x9f9t9w9sdf9pspdfg"
      "id": 1692,
      "identity_provider": "/api/v1/identity-provider/112/",
      "idp_id": 159,
      "resource_uri": "/api/v1/ssopermission/1692/",
      "roles": [
        {
          "id": 4567,
          "name": "Test",
          "type": "user"
        },
        {
          "id": 3238,
          "name": "AnomaliRole_azure",
          "type": "user"
        }
      ]
    }
  ]
}

 

Attribute Description
group The UUID of the SSO security group.
id ID of the SSO security group.
identity_provider API of the identity provider to which the SSO security group belongs.
idp_id ID of the identity provider.
resource_uri URI to the SSO security group
roles Roles mapped to the SSO security group.

Anomali Permissions

Below is the list of permissions that can be added to a role. Permissions such as is_readonly, can_use_chat, can_see_api_key cannot be added to a role. To grant these permissions to users, the corresponding system roles must be assigned. To learn how to view the list of system roles, refer to Using System Roles.

Permission Type Description
can_approve_intel boolean Enables a user to approve imported intelligence.
can_audit boolean Grants a user read-only access to all ThreatStream pages and settings.
can_change_rules boolean Enables a user to edit rules.
can_import_to_taxii_inbox boolean Enables a user to push data from TAXII clients to your ThreatStream TAXII server.
can_share_intelligence boolean Enables a user to create intelligence shared with the Anomali Community. This includes importing observables, creating Sandbox reports, as well as modifying tags and commenting on observables and Sandbox reports shared with the Anomali Community.
can_submit sandbox boolean Enables a user to submit malware to a sandbox for detonation. This privilege also applies to sandbox submissions made through phishing mailboxes.
can_use_match boolean Enables a user to access Anomali Security Analytics.
is_org_admin boolean Grant a user Org Admin privileges.
is_tfa_exempt boolean Makes a user exempt from multi-factor authentication.

Examples

  1. To get a list of users and roles assigned to them:

    Copy
    curl 'https://api.threatstream.com/api/v1/orgadmin/' -H 'Authorization: apikey <username>:<api_key>'
  2. To get a list of roles:

    Copy
    curl 'https://api.threatstream.com/api/v1/user_role/' -H 'Authorization: apikey <username>:<api_key>'
  3. To delete the role whose ID is 4:

    Copy
    curl --request DELETE 'https://api.threatstream.com/api/v1/user_role/4/' -H 'Authorization: apikey <username>:<api_key>' -v
  4. Add a new user with the email johnhopkins@anomali.com and assign them the roles whose IDs are 7 and 9:

    Copy
    curl --request POST --data '{"email": "johnhopkins@anomali.com", "roles": [7, 9]}' 'https://api.threatstream.com/api/v1/orgadmin/' -H 'Authorization: apikey <username>:<api_key>' -H 'Content-Type: application/json' -v
  5. Create the PlatformOrgAdmin role that includes the following permissions: is_org_admin, is_tfa_exempt, and can_use_match:

    Copy
    curl --request POST --data '{"name": "PlatformOrgAdmin", "permissions": ["is_org_admin", "is_tfa_exempt", "can_use_match"]}' 'https://api.threatstream.com/api/v1/orgadmin/' -H 'Authorization: apikey <username>:<api_key>' -H 'Content-Type: application/json' -v
  6. Map the SecAdminGroup SSO security group to the role whose ID is 6 and ID of the identity provider is 7:

    Copy
    curl --request PATCH --data '{"group": "SecAdminGroup", "idp_id": 7, "roles": [6]}' 'https://api.threatstream.com/api/v1/orgadmin/' -H 'Authorization: apikey <username>:<api_key>' -H 'Content-Type: application/json' -v