Skip to content

user_roles

Lists the Falcon user roles available for a customer (CID), including default and custom roles with their display name, description, scope, and type.

The following API scopes are required:

  • User Management: READ
terraform {
required_providers {
crowdstrike = {
source = "registry.terraform.io/crowdstrike/crowdstrike"
}
}
}
provider "crowdstrike" {
cloud = "us-2"
}
# Retrieve every user role available for the CID authenticated by the provider.
data "crowdstrike_user_roles" "example" {}
# Retrieve the roles available to a specific user in a specific child CID.
data "crowdstrike_user_roles" "by_user" {
user_uuid = "abcdef12-3456-7890-abcd-ef1234567890"
cid = "abcdef1234567890abcdef1234567890"
}
output "roles" {
value = data.crowdstrike_user_roles.example.roles
}
  • cid (String) (FCTL customers) When making requests from the parent CID, use cid to specify the ID of the child CID to retrieve user role IDs from. Multiple values are not supported. In FCTL deployments, a user_uuid may be assigned the same role in multiple CIDs. The cid parameter ensures that role IDs are retrieved from the right CID. If a cid is not provided, the user role IDs are retrieved for the CID making the request. Provide the 32-character lowercase hexadecimal CID without the checksum suffix (e.g. abcdef1234567890abcdef1234567890, not ABCDEF1234567890ABCDEF1234567890-0F).
  • user_uuid (String) The ID of the user to get available roles for.

Read-Only:

  • cid (String) The Customer ID (CID) that owns the role. Only set for custom roles; null for default roles.
  • description (String) The description of the role.
  • display_name (String) The human-readable name of the role.
  • id (String) The unique identifier of the role.
  • is_global (Boolean) Whether the role applies globally across all CIDs.
  • type (String) The role type, either default or custom.