Skip to content

IAM / Reference

IAM reference

Updated · 3 min read

Where to find every origin iam command and built-in role, and a one-line summary of each IAM query and mutation in the GraphQL API.

On this page4 sections

Look up exact commands, roles and API operations here. For how IAM works, see Access model.

Reference pages

PageWhat it lists
CLI commandsEvery origin iam command with its options. See origin iam commands.
Built-in rolesEvery role with its URN and permissions. See Built-in roles.
ErrorsError codes shared by every API operation. See Errors.

GraphQL queries

All queries are fields of the iam namespace of the query root.

QueryReturns
currentUserThe signed-in user.
currentUserGrantsEvery role assignment the caller holds, in all organizations.
principalGrantsEvery role assignment one principal holds in the organization, with its scope and creation time. Needs iam.member.list, like orgRoleAssignments.
rolesEvery built-in role with its permissions.
roleOne built-in role by the URN roles lists. Needs no permission.
groupsThe three built-in groups, by name and description. Groups aren’t principals and can’t hold roles.
groupOne built-in group by URN, with your organization ID in it: urn:origin:cloud:iam::<org-id>::tc/group/<group-id>.
permissionsEvery permission the platform defines.
hasPermissionWhether a principal holds a permission on a resource.
orgMembersEvery principal with a role assignment in the organization, with its role URNs.
orgRoleAssignmentsEvery role assignment in the organization, with its scope and creation time.
orgInvitesPending invites in the organization.
serviceAccountsEvery service account in the organization, active or revoked, without secrets.
auditLogEntriesOne page of the organization’s audit log. See Audit log.

GraphQL mutations

All mutations are fields of the iam namespace of the mutation root.

MutationEffect
assignRoleAssigns a built-in role to a principal, org-wide or for one project. Only a role whose permissions you hold yourself at that scope.
revokeRoleRevokes one role from a principal at exactly the given scope. Only a role whose permissions you hold yourself at that scope.
inviteMemberInvites a person by email with one org-wide role, which you must be able to assign.
removeMemberRevokes every role a principal holds in the organization, if you could revoke each of them.
revokeInviteCancels a pending invite.
createServiceAccountCreates a service account and returns its client ID and one-time client secret.
revokeServiceAccountDisables a service account’s credential.

Example: list one principal’s grants

principalGrants takes its arguments in an input object with orgId and principal. This form replaced a bare principal argument on 12 October 2026, without a deprecation period. A grant whose projectId is null is org-wide.

GraphQL
query {
  iam {
    principalGrants(input: {
      orgId: "<org-id>"
      principal: "user:<user-id>"
    }) {
      urn
      projectId
      roles {
        roleUrn
      }
      createdAt
      createdBy
    }
  }
}

The CLI equivalent is origin iam principal-grants --org-id <org-id> --principal <principal>.