> ## Documentation Index
> Fetch the complete documentation index at: https://docs.asccli.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Users

# users

> Manage users and invitations in App Store Connect

Manage users, roles, permissions, and invitations in App Store Connect.

## Quick Start

```bash theme={null} theme={null}
asc users list
asc users invite --email "user@example.com" --first-name "Jane" --last-name "Doe" --roles "ADMIN" --all-apps
asc users update --id "USER_ID" --roles "DEVELOPER"
```

## Subcommands

* `list` - List users in App Store Connect
* `get` - Get a user by ID
* `update` - Update a user
* `delete` - Delete a user
* `invite` - Invite a user
* `invites` - Manage user invitations
* `visible-apps` - Manage visible apps for users

## Commands

### users list

List users in App Store Connect:

```bash theme={null} theme={null}
asc users list
asc users list --email "user@example.com"
asc users list --role "ADMIN"
asc users list --role "DEVELOPER,APP_MANAGER"
asc users list --limit 50
asc users list --paginate
```

**Flags:**

* `--email` - Filter by email/username
* `--role` - Filter by role (comma-separated): `ADMIN`, `DEVELOPER`, `APP_MANAGER`, etc.
* `--limit` - Maximum results per page (1-200)
* `--next` - Fetch next page using a links.next URL
* `--paginate` - Automatically fetch all pages
* `--output` - Output format: `json`, `table`, `markdown`
* `--pretty` - Pretty-print JSON output

### users get

Get a user by ID:

```bash theme={null} theme={null}
asc users view --id "USER_ID"
asc users view --id "USER_ID" --include visibleApps
```

**Flags:**

* `--id` - User ID (required)
* `--include` - Include related resources: `visibleApps`
* `--output` - Output format: `json`, `table`, `markdown`
* `--pretty` - Pretty-print JSON output

### users update

Update a user:

```bash theme={null} theme={null}
asc users update --id "USER_ID" --roles "ADMIN"
asc users update --id "USER_ID" --roles "DEVELOPER" --visible-app "APP_ID"
```

**Flags:**

* `--id` - User ID (required)
* `--roles` - Comma-separated role IDs (required)
* `--visible-app` - Comma-separated app IDs for visible apps
* `--output` - Output format: `json`, `table`, `markdown`
* `--pretty` - Pretty-print JSON output

### users delete

Delete a user:

```bash theme={null} theme={null}
asc users delete --id "USER_ID" --confirm
```

**Flags:**

* `--id` - User ID (required)
* `--confirm` - Confirm deletion (required)
* `--output` - Output format: `json`, `table`, `markdown`
* `--pretty` - Pretty-print JSON output

### users invite

Invite a new user to App Store Connect:

```bash theme={null} theme={null}
asc users invite \
  --email "user@example.com" \
  --first-name "Jane" \
  --last-name "Doe" \
  --roles "ADMIN" \
  --all-apps

asc users invite \
  --email "user@example.com" \
  --first-name "John" \
  --last-name "Smith" \
  --roles "DEVELOPER" \
  --visible-app "APP_ID"
```

**Flags:**

* `--email` - Email address to invite (required)
* `--first-name` - First name of the invitee (required)
* `--last-name` - Last name of the invitee (required)
* `--roles` - Comma-separated role IDs (required)
* `--all-apps` - Grant access to all apps
* `--visible-app` - Comma-separated app IDs for visible apps
* `--output` - Output format: `json`, `table`, `markdown`
* `--pretty` - Pretty-print JSON output

**Note:** Either `--all-apps` or `--visible-app` is required (mutually exclusive).

## User Invitations

### users invites list

List user invitations:

```bash theme={null} theme={null}
asc users invites list
asc users invites list --limit 50
asc users invites list --paginate
```

**Flags:**

* `--limit` - Maximum results per page (1-200)
* `--next` - Fetch next page using a links.next URL
* `--paginate` - Automatically fetch all pages
* `--output` - Output format: `json`, `table`, `markdown`
* `--pretty` - Pretty-print JSON output

### users invites view

Get a user invitation by ID:

```bash theme={null} theme={null}
asc users invites view --id "INVITE_ID"
```

**Flags:**

* `--id` - Invitation ID (required)
* `--output` - Output format: `json`, `table`, `markdown`
* `--pretty` - Pretty-print JSON output

### users invites revoke

Revoke a user invitation:

```bash theme={null} theme={null}
asc users invites revoke --id "INVITE_ID" --confirm
```

**Flags:**

* `--id` - Invitation ID (required)
* `--confirm` - Confirm revocation (required)
* `--output` - Output format: `json`, `table`, `markdown`
* `--pretty` - Pretty-print JSON output

### users invites visible-apps list

List visible apps for an invitation:

```bash theme={null} theme={null}
asc users invites visible-apps list --id "INVITE_ID"
```

**Flags:**

* `--id` - Invitation ID (required)
* `--limit` - Maximum results per page (1-200)
* `--next` - Fetch next page using a links.next URL
* `--paginate` - Automatically fetch all pages
* `--output` - Output format: `json`, `table`, `markdown`
* `--pretty` - Pretty-print JSON output

## Visible Apps

### users visible-apps list

List visible apps for a user:

```bash theme={null} theme={null}
asc users visible-apps list --id "USER_ID"
asc users visible-apps list --id "USER_ID" --limit 50
asc users visible-apps list --id "USER_ID" --paginate
```

**Flags:**

* `--id` - User ID (required)
* `--limit` - Maximum results per page (1-200)
* `--next` - Fetch next page using a links.next URL
* `--paginate` - Automatically fetch all pages
* `--output` - Output format: `json`, `table`, `markdown`
* `--pretty` - Pretty-print JSON output

### users visible-apps list

Get visible apps for a user:

```bash theme={null} theme={null}
asc users visible-apps list --id "USER_ID"
```

**Flags:**

* `--id` - User ID (required)
* `--output` - Output format: `json`, `table`, `markdown`
* `--pretty` - Pretty-print JSON output

## User Roles

Common user roles in App Store Connect:

* `ADMIN` - Full access to all features
* `APP_MANAGER` - Manage apps and submissions
* `DEVELOPER` - Access to development features
* `MARKETING` - Access to marketing features
* `SALES` - Access to sales and trends
* `FINANCE` - Access to financial reports
* `CUSTOMER_SUPPORT` - Access to customer support features
* `ACCESS_TO_REPORTS` - Read-only access to reports

See the [App Store Connect documentation](https://developer.apple.com/support/roles/) for role descriptions and permissions.

## Examples

### Invite Admin User

```bash theme={null} theme={null}
asc users invite \
  --email "admin@example.com" \
  --first-name "Admin" \
  --last-name "User" \
  --roles "ADMIN" \
  --all-apps
```

### Invite Developer for Specific App

```bash theme={null} theme={null}
asc users invite \
  --email "dev@example.com" \
  --first-name "Dev" \
  --last-name "User" \
  --roles "DEVELOPER" \
  --visible-app "123456789"
```

### Update User Role

```bash theme={null} theme={null}
# Change user role from DEVELOPER to APP_MANAGER
asc users update --id "USER_ID" --roles "APP_MANAGER"
```

### Grant App Access

```bash theme={null} theme={null}
# Grant access to specific apps
asc users update \
  --id "USER_ID" \
  --roles "DEVELOPER" \
  --visible-app "123456789,987654321"
```

### List All Admins

```bash theme={null} theme={null}
asc users list --role "ADMIN" --output table
```

### Revoke Invitation

```bash theme={null} theme={null}
# List pending invitations
asc users invites list --output table

# Revoke a specific invitation
asc users invites revoke --id "INVITE_ID" --confirm
```

### Remove User

```bash theme={null} theme={null}
asc users delete --id "USER_ID" --confirm
```

## Automation

### Bulk User Invitation

```bash theme={null} theme={null}
#!/bin/bash
set -e

# Read users from CSV file
while IFS=, read -r email first_name last_name role apps; do
  echo "Inviting $email as $role"
  
  if [ "$apps" = "ALL" ]; then
    asc users invite \
      --email "$email" \
      --first-name "$first_name" \
      --last-name "$last_name" \
      --roles "$role" \
      --all-apps
  else
    asc users invite \
      --email "$email" \
      --first-name "$first_name" \
      --last-name "$last_name" \
      --roles "$role" \
      --visible-app "$apps"
  fi
done < users.csv
```

**users.csv:**

```csv theme={null} theme={null}
dev1@example.com,Dev,One,DEVELOPER,123456789
dev2@example.com,Dev,Two,DEVELOPER,123456789,987654321
admin@example.com,Admin,User,ADMIN,ALL
```

### User Audit Report

```bash theme={null} theme={null}
#!/bin/bash
set -e

# Generate user audit report
OUTPUT=$(asc users list --paginate --output json)

# Extract user details
echo "$OUTPUT" | jq -r '.data[] | "\(.attributes.username),\(.attributes.roles[0]),\(.attributes.allAppsVisible)"'
```
