【发布时间】:2021-07-01 02:51:33
【问题描述】:
我想从位于其他 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 的新手,我不确定我在这里缺少什么。谢谢。
【问题讨论】:
-
您使用的订阅是否与租户 2 匹配?
-
您正在使用租户 1 颁发的令牌调用租户 2 的订阅资源。
-
您能否详细说明“您正在使用匹配租户 2 的订阅”是什么意思?两种资源(存储帐户和 vnet)都在不同租户的不同订阅中。
-
关于“使用租户 1 颁发的令牌调用租户 2 的订阅资源”:明确地说,我没有进行任何 API 调用,它是默认存储帐户的后端。有什么方法可以让我提到这个特定的 vnet/子网来自不同租户的存储帐户服务,以便它使用该租户的 sts 令牌进行身份验证。
-
您使用的订阅 ID 在租户 2 中,对吧?
标签: azure azure-active-directory azure-storage multi-tenant web-application-firewall