如果我理解正确,您希望通过订购Azure CSP集成来获得订阅列表。
您可以检索与订单对应的Azure云解决方案提供程序(Azure CSP)订阅资源的集合。要检索资源,可以使用PowerShell,C#或REST API命令。
Powershell的指导
$customer = Get-PCCustomer -tenantid '<tenant id GUID>'
Get-PCSubscription -tenantid $customer.id -orderid '<order id GUID>'
C#SDK指南
通过以获得订阅列表,使用您的IAggregatePartner.Customers采集和调用ById()方法。然后拨打订阅属性,然后按ByOrderId()方法。通过致电获取()或GetAsync()。
// IAggregatePartner partnerOperations;
// var selectedCustomerId as string;
// string orderID;
ResourceCollection<Subscription> customerSubscriptions = partnerOperations.Customers.ById(selectedCustomerId).Subscriptions.ByOrder(orderID).Get();
REST API实施例
GET https://api.partnercenter.microsoft.com/v1/customers/{customer-tenant-id}/subscriptions?order_id={id-for-order} HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 16fee928-dc2c-412f-adbb-871f68babf16
MS-CorrelationId: c49004b1-224f-4d86-a607-6c8bcc52cfdd
Connection: Keep-Alive
查看在this document更多细节。
不完全。这个用例是检查一个已经在我们公司购买了bot的租户的订阅。通过检查我的意思是检查包含在订阅中的数量和它的状态。通过MSOL,我们可以检查例如O365_BUSINESS_PREMIUM的所有订阅。 –
@NormandBedard,好吧,这些示例没有得到您想要的SKU信息,但它获得了订阅的状态和其他详细信息。据我所知,没有办法使用Graph API直接获取所有你想要的信息。 –