使用azure explorer 插件的時候,登錄默認是globle的azure網站,中國區的azure不能直接使用json
可使用auth文件認證api
auth 文件生成
az cloud show -o json --query "{managementURI: endpoints.management, baseURL: endpoints.resourceManager, authURL: endpoints.activeDirectory, graphURL: endpoints.activeDirectoryGraphResourceId}"
az account show -o json --query "{subscription: id}"
az ad sp create-for-rbac -o json --query "{client: appId, key: password, tenant: tenant}"
根據上述腳本獲取相關信息bash
而後按下面格式拼接起來app
client= key= tenant= subscription= authURL=https\://login.chinacloudapi.cn/ baseURL=https\://management.chinacloudapi.cn/ graphURL=https\://graph.chinacloudapi.cn/ managementURI=https\://management.core.chinacloudapi.cn/