📖Search reference
This page is the complete reference for inventory queries: every query operator, search term, attribute, and allowed value. If you're new to the query language, read Query Language Basics first for a guided introduction. This page is for looking up specifics.
Query operators
Query expressions let you be more specific in your searches. Here's a summary of every operator:
Key terms
Node terms
type:attribute:keyterm or type:{attribute1:keyterm1 attribute2:keyterm2 ...}
Match data attributes
Path terms
keyterm->childpath
Child paths
Match a directed path in child direction
keyterm<-parentpath
Parent paths
Match a directed path in parent direction
keyterm<>eitherpath
Either paths
Match a directed path in either parent or child direction
Exclusion term
Compound expression
Cypher equivalents
Each detailed explanation below also describes the equivalent statement in the Cypher query language (replace {show} with the corresponding label of the "show" control).
When displaying data as a table, the displayed data are the nodes matching the "show" type (represented by s in the equivalent queries); when displaying data as a graph visualization, the displayed data are the returned paths (represented by p in the equivalent queries).
"Contains" matches
In its simplest usage, P0 matches IAM data if it includes your search keyword. For example, searching for compute shows you grants that allow access to any compute resource, give any privileges with "compute" in their name, grant a permission set with "compute" in its name, or grant access to compute service principals.
"Contains" matches are case insensitive; use Exact matches to find data with exact casing.
Cypher equivalent:
Exact matches
To match data exactly, enclose your keyword in double quotes. For example, searching for compute.instances.get in GCP matches extra permissions, such as compute.instances.getEffectiveFirewalls. Searching for "compute.instances.get" limits results to only those grants that have that specific permission.
Cypher equivalent:
Regex matches
To match data against a regular expression, enclose your pattern in forward slashes. For example, /^arn:aws:iam::\d+:role\// matches values that start with an AWS IAM role ARN prefix, and /prod|staging/ matches values containing either prod or staging.
P0 evaluates the pattern with the standard JavaScript regular expression engine, so anchors (^, $), character classes, quantifiers, and alternation (|) all work as you'd expect.
Regex matches combine with type and attribute matches the same way other keywords do. The slashes surround the pattern only: type:/pattern/ or type:attribute:/pattern/. To invert a regex match, place the ! before the pattern: type:attribute:!/pattern/. See Inverted matches.
Regex matches are case sensitive, unlike "Contains" matches, which are case insensitive. JavaScript inline flags such as /pattern/i aren't supported, so express case insensitivity inside the pattern, for example, /[Pp]rod/.
Cypher equivalent:
Inverted matches
You can search for grants and principals that are connected to data that don't match a keyword by typing a ! in front of your search keyword.
Note that using an inverted match on its own usually doesn't do much, as grants and principals connect to many data, and some of these data are likely to not match your keyword. Instead, inverted matches are usually best when combined with type or attribute matches, or with exclusion matches. For example, identity:mfa:!enabled shows you all users that have either disabled or unknown MFA status.
Cypher equivalent:
Exclusion matches
You can search for items that aren't connected to data that match a term by typing a ^ in front of your entire search term.
For example, searching for ^usage:type:"unused" shows all grants that have only used or unknown permission usage. Searching for ^usage:type:!"unused" shows all grants where all permissions are unused.
Cypher equivalent:
Type matches
Limit your search to a specific type of IAM data using a type prefix. For example, adding risk:CRITICAL in front of your search limits your search to only showing grants that allow a critical IAM risk (as defined by the IAM Privilege Catalog). See Search types for a list of all possible types.
Cypher equivalent:
"First" matches
Data may connect to a chain of items of the same type. For instance, a grant on a resource gives access to all that resource's children, and all those child resources' children, and so forth. Or, grants may target directory groups with nested group membership.
To restrict your search to only the first item in such a chain, use a first match. For example, identity=alice@my.co shows only the alice@my.co user, and not the groups to which that user belongs.
Cypher equivalent:
Attribute matches
Attribute expressions allow you to make even more specific searches. For example, searching for credential:last90:unused limits displayed principals to those with at least one credential that hasn't been used in the previous 90 days. See Search attributes for a list of all possible attributes.
Cypher equivalent:
Multiple matches
Return items that connect to multiple data by separating search terms using whitespace.
For instance, resource:one resource:two shows you grants that give access to both resources "one" and "two".
Cypher equivalent:
Via matches
Your IAM data are modeled as a directed graph. You can require data to connect to your search results according to multiple search terms using a via match.
To use a via match, connect two or more terms using -> (for child relationships), <- (for parent relationships), or <> (for either child or parent relationships).
For example, to find all entitlements that have unused permissions that create a data exfiltration risk, you can search for usage:type:"unused"->risk:"exfiltration:data".
You can chain multiple terms together using more ->. For example usage:type:"unused"->privilege:s3->risk:"exfiltration:data".
Paths must consistently use child, parent, or "either" relationship syntax. Mixed paths like a->b<-c are not currently supported.
You can reference how data are connected in this graph using IAM graph.
Cypher equivalent for s<>r:
Search types
These are all the possible search types, and their meaning:
awsPolicy - an AWS policy
condition - a grant condition
consumer - the entity that authenticates using a credential; this is typically an IP address
credential - a single authentication credential; search matches the name of the credential (e.g. ID of an API key); will be "federated" if the principal authenticates using SSO
entitlement - a set of privileges to use one or more resources, granted to an identity (an entitlement may be an AWS policy assignment, GCP role binding, or Azure / Kubernetes / Okta / Workspace role assignment)
identity - an IAM identity; search matches the name of the identity (e.g. email; group name, AWS role name, etc.)
lateral - represents potential machine-identity impersonation; each path is represented by two graph nodes, one attached to the grant that allows impersonation, the other attached to the principal that can be impersonated (see
lateral:flowbelow)permissionSet - an AWS permission set
privilege - a grantable privilege (this can be an AWS action, or Azure, Google Cloud, Okta, or Workspace permission)
resource - an IAM resource
risk - a security risk associated with holding a privilege; possible risks are listed in the IAM Privilege Catalog; you can also search for risk severity scores (e.g.
CRITICAL)role - an Azure, Google Cloud, Kubernetes, Microsoft Entra ID (directory role, such as Global Administrator), Okta, or Workspace role (note that this is not an AWS role; use
identity:type:aws-iam-roleto search AWS roles)usage - represents privilege usage (in the last 90 days):
used- the privilege was used in the last 90 daysunused- the privilege has been unused for all of the previous 90 daysunknown- P0 lacks evidence to determine if the privilege is used or unused
Search attributes
Search attributes allow more specific type searches. Allowable attributes are:
condition:expression - a grant condition's expression
credential:stale90 - represents whether this credential is stale: created more than 90 days ago (
true) or more recently (false)credential:last40 & credential:last90 - represents if this authentication method has been used in the previous 40 or 90 days (respectively); values are
usedorunusedcredential:type - the type of the authentication credential; may be one of
federated- a credential from an external IAM systemkey- a static secret credentialpassword- a user password credential (for example, a Microsoft Entra ID user password)short-lived- represents all ephemeral credentials, including JWTs, temporary keys, account impersonation, and the like
entitlement:cross - true if access is granted to an identity managed outside of the IAM resource (e.g. a GCP role assigned to an Okta user)
entitlement:parent - the scope (AWS account, Azure subscription, GCP project, etc.) in which this entitlement is defined
entitlement:principal - the principal identity granted access by this entitlement
entitlement:principalType - the identity type of this entitlement's principal identity (see
identity:typebelow for possible values)entitlement:provider - the service in which this entitlement is defined; possible values are
aws,azure,azure-ad,entra-id,gcp,k8s,okta, orworkspaceentitlement:resource - the resource(s) to which this entitlement grants access
entitlement:role - the role granted by this entitlement
identity:accessAdd - who can add users to this group (only available for Workspace groups):
admin- only group administrators can add usersgroup- anyone in the group can add usersowner- only the group owners can add usersIf not present, no one can directly add users
identity:accessApprove - who can approve group join requests (only available for Workspace groups):
admin- only group administrators can approve requestsgroup- anyone in the group can approve requestsowner- only the group owners can approve requestsIf not present, no one can approve requests
identity:accessJoin - who can join this group without approval (only available for Workspace groups):
public- anyone on the Internet can joindomain- anyone in the Workspace domain can joininvited- users can join if they've received an inviteIf not present, users can only be directly added to the group
identity:accessView - who can view this group's content (only available for Workspace groups; content is the group's messages):
public- anyone on the Internet can viewdomain- anyone in the Workspace domain can viewgroup- anyone in the group can viewadmin- only group administrators can view
identity:external - true if the identity is managed outside the assessed environment
identity:parent - the scope (AWS account, Azure subscription, GCP project, etc.) that manages this identity
identity:provider - the service that manages this identity; possible values are
aws,azure,azure-ad,entra-id,gcp,k8s,okta, orworkspaceidentity:status - one of:
active- the principal can authenticatedisabled- the principal's authentication is disabled
identity:type - the type of the IAM principal; may be one of
aws-iam-role- an AWS IAM roleaws-permission-set-role- an AWS IAM role automatically generated by AWS when assigning an AWS permission set to an accountentra-app-registration- a Microsoft Entra ID application registration (the application object that defines an app and its permissions)federated- an identity used to provide access to identities from another provider (e.g. an AWS IAM role withPrincipal.Federatedin its trust relationship); the identity's parents will be the federated identitiesgroup- a directory grouppublic- any identityservice-agent- a provider-managed accountservice-account- a machine identity (in AWS this is usually an AWS role)service-principal- a Microsoft Entra ID service principal (the local instance of an application or managed identity within a tenant)user- a user identity
lateral:type - the mechanism via which lateral escalation can be achieved:
grant- lateral movement via a granted privilege (e.g. GCPiam.serviceAccounts.actAsor AWSsts:assumeRole)resource- lateral movement via usage of a service-linked resource (e.g. lateral movement to a compute service identity via shell access)Note: federated access is represented as a direct principal-to-principal relationship, and is not modeled via lateral-movement
privilegeSet:provider - the service that manages this role or AWS policy; possible values are
aws,azure,azure-ad,entra-id,gcp,k8s,okta, orworkspaceresource:service - the resource's parent cloud service; use the API path of the service (e.g.
ssoinstead ofIdentity Center)resource:type - the resource's type (e.g.
bucket)risk:score - the access risk score from the IAM Privilege Catalog; one of
CRITICAL,HIGH,MEDIUM,BOOST,EVASION, orLOW
IAM graph
Your IAM data are connected in a directed graph, as shown, with each node label indicating the datum's respective type:

Query builder
You can assemble a single search term with the Query builder instead of typing it. Click the + button beside the where box, above the table or graph, to open the builder form. As you set each control, the builder shows a live preview of the term, and clicking Add term inserts it into the where box.
Each control maps to an operator described above:
Show … that are vs can reach
Matches the displayed node itself (=) or a node it reaches (:).
Search type (identities, entitlements, …)
Adds the type prefix, such as identity:.
with (attribute)
Adds an attribute filter.
containing vs equal to
Substring match or exact match ("keyword").
Invert match?
Applies the ! inverted operator to the keyword.
Remove match?
Applies the ^ exclusion operator to the term.
Only first node?
Uses = instead of : to match only the first node in a chain.
The builder constructs one term at a time and produces ordinary query text, the same as what you would type by hand. To require several conditions, add multiple terms (see Multiple matches).
Last updated