企业微信(WeCom)-基础 icon

企业微信(WeCom)-基础

企业微信基础功能 - 通讯录、应用消息、群聊、消息推送、企业互联、素材、系统、电子发票、第三方应用授权、接口调用许可、收银台、对外收款、小程序对外收款、企业红包/向员工付款、数据与智能专区、会话内容存档、推广二维码、账号ID、安全管理

Actions257

通讯录管理 → [查看权限] 修改规则

AI-generated

Summary

Update existing contact view permission rules within an enterprise WeCom directory using the "通讯录同步" Secret-based API credential with editing rights.

Inputs

  • 规则列表 (contactRules) (required) — Provide one or multiple permission rules to update. Each rule must include the rule ID (rule_id) to identify the rule to modify, and must keep the rule type (rule_type) consistent with the original. Specify target members/departments/tags to be hidden or restricted, white-listed members/departments/tags allowed to view, excluded members/departments/tags exempt from restrictions, and optional flags for allowing search and conversation permissions (only applicable for certain rule types).

Output shape

a JSON object reflecting the API response for the update operation, typically confirming success or reporting errors.

Operation requires the "通讯录同步" Secret credential with the "API 编辑通讯录" permission enabled, and is subject to rate limits: max 5 calls per minute, 10 per hour, and 60 per day. Rule IDs to modify must be obtained from the rule list retrieval operation. Multiple rules (up to 100) can be updated in a single call.

Examples

Example 1: Update multiple contact view permission rules to modify which users or departments are hidden or restricted, while setting who can still view or be excluded from restrictions.

Set the operation to '[查看权限] 修改规则' under the '通讯录管理' resource and provide a list of rules specifying rule_id, rule_type (unchanged), target range (members, departments, tags), whitelist, exclude lists, and optional flags for search and conversation permissions.

Links

Discussion