你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az ad group

管理Microsoft Entra 组。

命令

名称 说明 类型 Status
az ad group create

创建组。

Core GA
az ad group delete

删除组。

Core GA
az ad group get-member-groups

获取指定组所属组的对象 ID 的集合。

Core GA
az ad group list

列出目录中的组。

Core GA
az ad group member

管理组成员。

Core GA
az ad group member add

将成员添加到组。

Core GA
az ad group member check

检查成员是否在组中。

Core GA
az ad group member list

获取组的成员。

Core GA
az ad group member remove

从组中删除成员。

Core GA
az ad group owner

管理组所有者。

Core GA
az ad group owner add

添加组所有者。

Core GA
az ad group owner list

列出组所有者。

Core GA
az ad group owner remove

删除组所有者。

Core GA
az ad group show

获取组的详细信息。

Core GA

az ad group create

创建组。

az ad group create --display-name
                   --mail-nickname
                   [--description]
                   [--force {false, true}]

示例

在目录中创建组。 (autogenerated)

az ad group create --display-name MyDisplay --mail-nickname MyDisplay

必需参数

--display-name

对象的显示名称或其前缀。

--mail-nickname

邮件昵称。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--description

组说明。

--force

始终创建新组,而不是使用相同的显示和邮件昵称更新组。

属性
接受的值: false, true
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az ad group delete

删除组。

az ad group delete --group

必需参数

--group -g

组的对象 ID 或显示名称(如果存在唯一匹配项,前缀也有效)。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az ad group get-member-groups

获取指定组所属组的对象 ID 的集合。

az ad group get-member-groups --group
                              [--security-enabled-only {false, true}]

必需参数

--group -g

组的对象 ID 或显示名称(如果存在唯一匹配项,前缀也有效)。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--security-enabled-only

如果指定仅应返回实体所属的安全组,则为 True;false 指定应返回实体所属的所有组和目录角色。

属性
默认值: False
接受的值: false, true
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az ad group list

列出目录中的组。

az ad group list [--display-name]
                 [--filter]

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--display-name

对象的显示名称或其前缀。

--filter

OData 筛选器,例如 --filter “displayname eq 'test' and servicePrincipalType eq 'Application'”。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az ad group show

获取组的详细信息。

az ad group show --group

必需参数

--group -g

组的对象 ID 或显示名称(如果存在唯一匹配项,前缀也有效)。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False