0
votes

https://management.azure.com/subscriptions/subID/providers/Microsoft.Compute/disks?api-version=2017-03-30

this gives me all Disks of New Azure portal.

replacing the above Microsoft.Compute to Microsoft.ClassicCompute does not give me the classic portal disks as there is no resource type called disks under classiccompute namespace.

what is the alternate to get classic portal disks?

Have tried https://management.core.windows.net/subid/services/disks but this uses a different auth mechanism all together is there any other endpoint?

1

1 Answers

0
votes

As you want to get the classic disks so we can Azure service management REST API that you mentioned.

https://management.core.windows.net/subscription-id/services/disks

How to authenticate Service Management Requests please refer to the official document.

Use X509 Certificate - You can always use X509 Certificate based authorization to authorize your SM API requests

X509Certificate2 certificate = GetStoreCertificate(Thumbprint);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
request.ClientCertificates.Add(certificate);

How to create a new self-signed certificate please refer to document

We also need to upload the certificate under subscription.

enter image description here

The following is my test result via postman. enter image description here

Other related links:

manage.windowsazure.com vs. portal.azure.com