获取 Token :
{
this.tokenCredentials = new ApplicationTokenCredentials(clientId, tentant, clientSecret,
AzureEnvironment.AZURE_CHINA).withDefaultSubscriptionId(subId);
AzureEnvironment environment = tokenCredentials.getEnvironment();
String loginUrl = environment.getAuthenticationEndpoint();
String managementUrl = "https://management.chinacloudapi.cn/";
String tenantId = tokenCredentials.getDomain();
String clientId1 = tokenCredentials.getClientId();
String secret = tokenCredentials.getSecret();
String accessToken = null;
URL url = new URL(String.format(loginUrl + "%s/oauth2/token?api-version=1.0", tenantId));
System.out.println(url.toString());
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setRequestProperty("Content-Type"