Azure Service Management - "ForbiddenError: This operation is not allowed for this subscription."

Azure Service Management - "ForbiddenError: This operation is not allowed for this subscription."

我尝试使用以下方式从 getVirtualMachineVMImagesOperations 中检索 OS 数据。

ComputeManagementClient computeManagementClient = ComputeManagementService.create(config);
    System.out.println("OS Type"+computeManagementClient.getVirtualMachineVMImagesOperations().getDetails("WindowsRemoteServer").getOSDiskConfiguration().getOperatingSystem());

我得到了错误 - "ForbiddenError: This operation is not allowed for this subscription."

Exception in thread "main" com.microsoft.windowsazure.exception.ServiceException: ForbiddenError: This operation is not allowed for this subscription.
    at com.microsoft.windowsazure.exception.ServiceException.createFromXml(ServiceException.java:208)
    at com.microsoft.windowsazure.management.compute.VirtualMachineVMImageOperationsImpl.getDetails(VirtualMachineVMImageOperationsImpl.java:1115)
    at com.microsoft.azure.auth.Program.main(Program.java:63)

看起来是某种权限错误。请分享您克服此错误的想法。

我从下面得到了操作系统。但是在我尝试使用 VirtualMachineVMImageOperations Class 时它仍然显示 "ForbiddenError: This operation is not allowed for this subscription."

System.out.println("OS Type"+computeManagementClient.getVirtualMachinesOperations().get("WindowsRemoteServer", "WindowsRemoteServer", "WindowsRemoteServer").getOSVirtualHardDisk().getOperatingSystem());

如有任何建议,我们将不胜感激。