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.
API Scopes
Section titled “API Scopes”The following API scopes are required:
- User Management: READ
Example Usage
Section titled “Example Usage”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}Schema
Section titled “Schema”Optional
Section titled “Optional”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, notABCDEF1234567890ABCDEF1234567890-0F).user_uuid(String) The ID of the user to get available roles for.
Read-Only
Section titled “Read-Only”roles(Attributes List) The user roles available for the CID. (see below for nested schema)
Nested Schema for roles
Section titled “Nested Schema for roles”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, eitherdefaultorcustom.