SOLVED

Is it possible to get Subscription name through REST API?

Microsoft

I would like to know if I can get subscription name for my Azure Resource, through REST API?

To add further, I even have subscription id, but wondering how to get subscription name?

1 Reply
best response confirmed by Vino55 (Microsoft)
Solution

Hi @Vino55,

if I understand you need to access Azure's management Apis, for example, to list the subscriptions you can use this endpoint:

GET https://management.azure.com/subscriptions?api-version=2016-06-01

and to get information about a specific subscription you can use this endpoint 

GET https://management.azure.com/subscriptions/{subscriptionId}?api-version=2016-06-01

(https://docs.microsoft.com/en-us/rest/api/resources/subscriptions/get#code-try-0)

and here is a list to the azure resource manager apis: 

https://docs.microsoft.com/en-us/rest/api/resources/

 

Best regards.

1 best response

Accepted Solutions
best response confirmed by Vino55 (Microsoft)
Solution

Hi @Vino55,

if I understand you need to access Azure's management Apis, for example, to list the subscriptions you can use this endpoint:

GET https://management.azure.com/subscriptions?api-version=2016-06-01

and to get information about a specific subscription you can use this endpoint 

GET https://management.azure.com/subscriptions/{subscriptionId}?api-version=2016-06-01

(https://docs.microsoft.com/en-us/rest/api/resources/subscriptions/get#code-try-0)

and here is a list to the azure resource manager apis: 

https://docs.microsoft.com/en-us/rest/api/resources/

 

Best regards.

View solution in original post