[英]How to access multiple Azure subscription through SPN in Azure Devops CICD?
我已經為 Azure devops 管道創建了 SPN,我需要在 powershell 任務/部署腳本 ARM 之間訪問多個訂閱資源。
#Linking appinsight with storage account in Secondary Region
Get-AzSubscription -SubscriptionId $secSubscriptionId | Set-AzContext
此命令適用於我的本地 powershell(因為我可以訪問兩個訂閱)。 但是對於 CICD,另一個訂閱不可見。即使兩個訂閱都在同一個租戶下,我也會遇到錯誤。
2020-05-12T17:17:14.9377680Z ##[error]Subscription XXXXXXX was not found in tenant ***. Please verify that the subscription exists in this tenant.
創建服務主體時,是否授予它訪問兩個訂閱中資源的權限?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.