SOLVED

Is it possible to get Subscription name through REST API?

%3CLINGO-SUB%20id%3D%22lingo-sub-370040%22%20slang%3D%22en-US%22%3EIs%20it%20possible%20to%20get%20Subscription%20name%20through%20REST%20API%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-370040%22%20slang%3D%22en-US%22%3E%3CP%3EI%20would%20like%20to%20know%20if%20I%20can%20get%20subscription%20name%20for%20my%20Azure%20Resource%2C%20through%20REST%20API%3F%3C%2FP%3E%0A%3CP%3ETo%20add%20further%2C%20I%20even%20have%20subscription%20id%2C%20but%20wondering%20how%20to%20get%20subscription%20name%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-370040%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAPI%20Management%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAutomation%20%26amp%3B%20Control%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Resource%20Management%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-375784%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20Subscription%20name%20through%20REST%20API%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-375784%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F263110%22%20target%3D%22_blank%22%3E%40Vino55%3C%2FA%3E%2C%3C%2FP%3E%3CP%3Eif%20I%20understand%20you%20need%20to%20access%20Azure's%20management%20Apis%2C%20for%20example%2C%20to%20list%26nbsp%3Bthe%20subscriptions%20you%20can%20use%20this%20endpoint%3A%3C%2FP%3E%3CPRE%3E%3CSPAN%20class%3D%22hljs-attribute%22%3EGET%20https%3A%2F%2Fmanagement.azure.com%2Fsubscriptions%3Fapi-version%3D2016-06-01%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3Eand%20to%20get%20information%20about%20a%20specific%20subscription%20you%20can%20use%20this%20endpoint%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CSPAN%20class%3D%22hljs-attribute%22%3EGET%20https%3A%2F%2Fmanagement.azure.com%2Fsubscriptions%2F%7BsubscriptionId%7D%3Fapi-version%3D2016-06-01%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Frest%2Fapi%2Fresources%2Fsubscriptions%2Fget%23code-try-0%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E(https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Frest%2Fapi%2Fresources%2Fsubscriptions%2Fget%23code-try-0)%3C%2FA%3E%3C%2FP%3E%3CP%3Eand%20here%20is%20a%20list%20to%20the%20azure%20resource%20manager%20apis%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Frest%2Fapi%2Fresources%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Frest%2Fapi%2Fresources%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
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
Highlighted
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.