简体   繁体   English

使用Azure资源图列出订阅

[英]list subscriptions with Azure Resource Graph

Is there any way of listing all authorized subscription by Azure resource graph (using rest API)? 有什么方法可以通过Azure资源图(使用rest API)列出所有授权订阅? Tried googling it and could not find a way 尝试谷歌搜索,找不到方法

You can use Azure Resource Manager - List Subscriptions REST API for that purpose. 为此,您可以使用Azure Resource Manager - List Subscriptions REST API。 More information can be found here: https://docs.microsoft.com/en-us/rest/api/resources/subscriptions/list . 可以在这里找到更多信息: https : //docs.microsoft.com/zh-cn/rest/api/resources/subscriptions/list

You can also access microsoft graph postman collection 您还可以访问Microsoft图形邮递员收藏

https://github.com/microsoftgraph/microsoftgraph-postman-collections https://github.com/microsoftgraph/microsoftgraph-postman-collections

在此处输入图片说明

I do this in my application by querying all items and then getting a distinct list of subscription IDs. 我在应用程序中通过查询所有项,然后获取不同的订阅ID列表来完成此操作。 It feels so wrong, but it works pretty well. 感觉很错,但是效果很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM