私が正しく理解していれば、Azure CSP統合の注文によるサブスクリプションの一覧を取得したいと考えています。
オーダーに対応するAzure Cloud Solution Provider(Azure CSP)サブスクリプションリソースのコレクションを取得できます。リソースを取得するには、PowerShell、C#、またはREST APIコマンドを使用できます。 、順番によってサブスクリプションのリストを取得し、あなたのIAggregatePartner.Customersコレクションを使用してByIdを(呼び出すに
PowerShellのガイド
$customer = Get-PCCustomer -tenantid '<tenant id GUID>'
Get-PCSubscription -tenantid $customer.id -orderid '<order id GUID>'
C#SDKガイド
)方法。その後、サブスクリプションプロパティの後にByOrderId()メソッドを呼び出します。 Get()または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で詳細を参照してください。
正確ではありません。ユースケースは、当社で購入したテナントのサブスクリプションを検査することです。私が購読に含める数量とその状態を調べることを意味します。 MSOLでは、O365_BUSINESS_PREMIUMのすべての購読を調べることができます。 –
@ NormandBedardでは、これらの例では必要なSKU情報は得られませんが、サブスクリプションのステータスやその他の詳細が得られます。私が知っているように、Graph APIを使用して直接必要なすべての情報を取得する方法はありません。 –