企业微信(WeCom)-基础 icon

企业微信(WeCom)-基础

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

Actions257

通讯录管理 → [查看权限] 创建规则

AI-generated

Summary

Create one or more contact viewing permission rules in WeCom to restrict or allow access to certain members, departments, and tags within the organization's address book, applying specific visibility constraints.

Inputs

  • contactRules (required) — A collection of permission rules to create, each specifying the rule type, target members/departments/tags to hide or restrict, whitelist exceptions, exclusion lists, and options for search and conversation permissions.

Output shape

a list of created permission rule objects including their IDs and details

Supports creating multiple rules per request (up to 100). Requires the '通讯录同步' Secret credential with 'API 编辑通讯录' enabled. Rate limits: 5 calls/minute, 10 calls/hour, 60 calls/day.

Examples

Example 1: Creating a 'Hide members/departments' rule targeting specific users and departments with white-listed exceptions and search/conversation permissions configured.

Set 'contactRules' with rules specifying 'rule_type' as '隐藏部门/成员', list target user IDs in 'range_userid', target department IDs in 'range_partyid', whitelist users/departments/tags, exclude lists, and toggles for 'is_allowed_search' and 'is_allowed_conversation'.

Links

Discussion