asc-users

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Team Members & Invitations with
asc

使用
asc
管理团队成员与邀请

Manage your App Store Connect team: list members, assign roles, revoke access, and control pending invitations. Built for directory integration and automated access workflows.
管理你的App Store Connect团队:列出成员、分配角色、撤销访问权限以及管控待处理邀请。本工具专为目录集成和自动化访问工作流设计。

Authentication

身份验证

bash
asc auth login --key-id <id> --issuer-id <id> --private-key-path ~/.asc/AuthKey.p8
bash
asc auth login --key-id <id> --issuer-id <id> --private-key-path ~/.asc/AuthKey.p8

CAEOAS — Affordances Guide Next Steps

CAEOAS — 可用操作指南后续步骤

Every JSON response includes
"affordances"
— ready-to-run commands with IDs pre-filled:
TeamMember affordances:
json
{
  "id": "u-abc123",
  "username": "jdoe@example.com",
  "roles": ["DEVELOPER", "APP_MANAGER"],
  "affordances": {
    "remove":      "asc users remove --user-id u-abc123",
    "updateRoles": "asc users update --user-id u-abc123 --role DEVELOPER --role APP_MANAGER"
  }
}
UserInvitationRecord affordances:
json
{
  "id": "inv-xyz789",
  "email": "new@example.com",
  "roles": ["DEVELOPER"],
  "affordances": {
    "cancel": "asc user-invitations cancel --invitation-id inv-xyz789"
  }
}
每个JSON响应都包含
"affordances"
字段——预填充ID的可直接运行命令:
TeamMember可用操作:
json
{
  "id": "u-abc123",
  "username": "jdoe@example.com",
  "roles": ["DEVELOPER", "APP_MANAGER"],
  "affordances": {
    "remove":      "asc users remove --user-id u-abc123",
    "updateRoles": "asc users update --user-id u-abc123 --role DEVELOPER --role APP_MANAGER"
  }
}
UserInvitationRecord可用操作:
json
{
  "id": "inv-xyz789",
  "email": "new@example.com",
  "roles": ["DEVELOPER"],
  "affordances": {
    "cancel": "asc user-invitations cancel --invitation-id inv-xyz789"
  }
}

Available Roles

可用角色

Use uppercase values with
--role
:
ADMIN
·
FINANCE
·
ACCOUNT_HOLDER
·
SALES
·
MARKETING
·
APP_MANAGER
·
DEVELOPER
·
ACCESS_TO_REPORTS
·
CUSTOMER_SUPPORT
·
CREATE_APPS
·
CLOUD_MANAGED_DEVELOPER_ID
·
CLOUD_MANAGED_APP_DISTRIBUTION
·
GENERATE_INDIVIDUAL_KEYS
使用
--role
参数时请使用大写值:
ADMIN
·
FINANCE
·
ACCOUNT_HOLDER
·
SALES
·
MARKETING
·
APP_MANAGER
·
DEVELOPER
·
ACCESS_TO_REPORTS
·
CUSTOMER_SUPPORT
·
CREATE_APPS
·
CLOUD_MANAGED_DEVELOPER_ID
·
CLOUD_MANAGED_APP_DISTRIBUTION
·
GENERATE_INDIVIDUAL_KEYS

Typical Workflows

典型工作流

Offboard a departing employee

处理离职员工权限

bash
DEPARTED_EMAIL="former@example.com"
bash
DEPARTED_EMAIL="former@example.com"

Check for an active team member

Check for an active team member

USER_ID=$(asc users list | jq -r --arg e "$DEPARTED_EMAIL"
'.data[] | select(.username == $e) | .id')
if [ -n "$USER_ID" ]; then asc users remove --user-id "$USER_ID" echo "Access revoked." else

Check for a pending invitation that hasn't been accepted yet

INV_ID=$(asc user-invitations list | jq -r --arg e "$DEPARTED_EMAIL"
'.data[] | select(.email == $e) | .id') [ -n "$INV_ID" ] && asc user-invitations cancel --invitation-id "$INV_ID" fi
undefined
USER_ID=$(asc users list | jq -r --arg e "$DEPARTED_EMAIL"
'.data[] | select(.username == $e) | .id')
if [ -n "$USER_ID" ]; then asc users remove --user-id "$USER_ID" echo "Access revoked." else

Check for a pending invitation that hasn't been accepted yet

INV_ID=$(asc user-invitations list | jq -r --arg e "$DEPARTED_EMAIL"
'.data[] | select(.email == $e) | .id') [ -n "$INV_ID" ] && asc user-invitations cancel --invitation-id "$INV_ID" fi
undefined

Onboard a new developer

新开发者入职邀请

bash
asc user-invitations invite \
  --email new-hire@example.com \
  --first-name Alex \
  --last-name Smith \
  --role DEVELOPER
bash
asc user-invitations invite \
  --email new-hire@example.com \
  --first-name Alex \
  --last-name Smith \
  --role DEVELOPER

Promote a developer to App Manager

将开发者晋升为App Manager

bash
undefined
bash
undefined

Get the user's ID first

Get the user's ID first

USER_ID=$(asc users list | jq -r '.data[] | select(.username == "dev@example.com") | .id')
USER_ID=$(asc users list | jq -r '.data[] | select(.username == "dev@example.com") | .id')

Update replaces all roles — include every role you want them to keep

Update replaces all roles — include every role you want them to keep

asc users update --user-id "$USER_ID" --role APP_MANAGER --role DEVELOPER
undefined
asc users update --user-id "$USER_ID" --role APP_MANAGER --role DEVELOPER
undefined

Audit: list all admins

审计:列出所有管理员

bash
asc users list --role ADMIN --output table
bash
asc users list --role ADMIN --output table

Output Flags

输出参数

bash
--pretty          # Pretty-print JSON
--output table    # Aligned table
--output markdown # Markdown table
bash
--pretty          # Pretty-print JSON
--output table    # Aligned table
--output markdown # Markdown table

Full Command Reference

完整命令参考

See commands.md for all flags, filters, and examples.
查看commands.md获取所有参数、过滤器和示例。