p0 ls
Overview
The p0 ls command lets you discover which resources and arguments you can use with P0’s request (grant/request) and standing-access (allow) workflows. It:
Lists valid identifiers (ARNs, role names, group IDs, etc.)
Marks items you already have access to with *
Supports filtering and paging
Outputs either human-readable lists or raw JSON
Use p0 ls to eliminate guesswork when constructing p0 grant or p0 allow commands.
Prerequisites
Logged-in user
Network access
Allow HTTPS egress to https://<your-tenant>/o/<org-slug>/command/.
Global Syntax & Flags
p0 ls [integration] [subcommand…] [--size N] [--json][integration]: example would be aws, azure-ad, gcloud, k8s, okta, pg, snowflake, ssh, workspace and more.
[subcommand…]: provider-specific resource filters (see below).
--size N: how many items to display (default: 15). Internally fetches 2×N to detect truncation.
--json: print the full JSON response and exit.
--help: show global or provider-specific help.
Providers & Subcommands
Run p0 ls <provider> --help for the exact list; here’s what each supports:
AWS
permission-set <name>
List AWS IAM Identity Center (SSO) permission sets matching role when using a federated identity.
policy <arns…>
List AWS IAM policies by ARN filter.
resource <arn> <policies…>
List which policies can attach to a given AWS resource ARN.
Examples
Azure AD (Entra ID)
membership [groupId]
List group memberships; if groupId is supplied, list members of that group.
Examples
Google Cloud (GCP)
resource <locator> <accesses…>
List available accesses (e.g., roles, permissions) for a GCP resource locator (project, folder, etc.).
role <name…>
List IAM roles matching name filters.
permission <name…>
List IAM permissions matching name filters.
Examples
Kubernetes
resource
List Kubernetes resource types you can request or allow (e.g., pods, deployments, clusterroles).
Examples
Okta
membership [groupId]
List Okta groups or, if groupId is given, the members of that group.
Examples
PostgreSQL
role <roles…>
List PostgreSQL roles matching provided names.
sql <text>
Infer required permissions by parsing a SQL statement or script.
Examples
Snowflake
role <name>
List Snowflake roles matching <name>.
sql <text>
Infer required permissions by parsing a SQL statement or script.
Examples
SSH
session <destination>
List SSH session instances (target host keys, Bastion details) matching <destination>.
parent <parent>
List all SSH resources that a given parent (user or group) can access.
group
List SSH access groups. Group is the tag value matching the tag key specificed when install the SSH integration.
Examples
Google Workspace
membership [groupId]
List Workspace groups or, if groupId is provided, the members of that group.
Examples
Output Details
Human mode
Marks items you already have (isPreexisting) with *.
Shows “Showing the first N…” and suggests filters if truncated.
Aligns key and value columns; long entries wrap with dimmed metadata.
JSON mode
Outputs:
Last updated