azure中存储帐户防火墙中的跨租户子网白名单



我想从驻留在其他Azure AD租户(比如租户id T2(中的子网(比如S1(访问驻留在Azure AD租户中的存储帐户(比如租户id T1(。使用azure CLI,我能够在存储帐户的防火墙和虚拟网络选项卡中添加此现有的通风口/子网。

AZ-CLI:az storage account network-rule add -g myRG --account myAccount --subnet mySubnetId

但是此子网的端点状态显示权限不足,而不是已启用。因此,无法从添加的子网S1访问此存储帐户。

错误:Unable retrieve endpoint status for one or more subnets. Status 'insufficient permissions' indicates lack of subnet read permissions ('Microsoft.Network/virtualNetworks/subnets/read').

详细错误:

You do not have authorization to access this resource.
Resource ID: /subscriptions/****/resourceGroups/my-network-rg/providers/Microsoft.Network/virtualNetworks/my-vnet
Status Code: 401
Status Message: The access token is from the wrong issuer 'https://sts.windows.net/T1/'. It must match the tenant 'https://sts.windows.net/T2/' associated with this subscription. Please use the authority (URL) 'https://login.windows.net/T2' to get the token. Note, if the subscription is transferred to another tenant there is no impact to the services, but information about new tenant could take time to propagate (up to an hour). If you just transferred your subscription and see this error message, please try back later.

我缺少哪些必要的跨租户权限?如何提供?感谢您的帮助。虽然这可能是微不足道的,但由于我是Azure的新手,我不确定我在这里错过了什么。谢谢

您已经正确执行了所有步骤,这只是一条令人困惑的消息:您与一个从租户1获得令牌的用户一起登录Azure门户,但VNet位于租户2中,并且您没有可用于读取租户2中的子网数据的令牌。

要确认网络规则实际上设置正确,您可以运行

az storage account network-rule list --account-name myAccount

你应该看到一个"state": "Succeeded"

唯一要做的就是确保访问来自子网的存储帐户的用户帐户具有访问存储帐户的合格角色分配。因此,例如,如果用户应该能够读取和写入blob数据,请为您的用户添加存储blob数据贡献者角色。

最新更新