来自非组织管理账户的 AWS Organizations list_accounts returns 个账户

AWS Organisations list_accounts returns accounts from non-org management account

我不确定这是设计使然。

我发现以下命令可以很好地从 AWS Organizations Root 账户或其客户账户获取 list_accounts()

import boto3
orgClient = boto3.client('organizations')

print(orgClient.list_accounts())

我的理解是,list_accounts 应该只在组织管理帐户上工作。

为什么我仍然从客户帐户中得到相同的结果?

根据 Boto3 docs 对于 list_accounts:

This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.

您是从委派的管理员帐户调用该操作吗?