microsoft / Partner-Center-PowerShell

PowerShell module for managing Partner Center resources.
https://docs.microsoft.com/powershell/partnercenter/
MIT License
130 stars 59 forks source link

Get-PartnerCustomerSubscription Module Doesnt Populate Perpetual Licenses #415

Open christianvincentaga opened 11 months ago

christianvincentaga commented 11 months ago

Hi Team,

Need your help on the correct Powershell Module to get all active Perpetual subscription that our Partner's customer has. I have found this and been using it to pull all installed based licensed. https://learn.microsoft.com/en-us/powershell/module/partnercenter/get-partnercustomersubscription?view=partnercenterps-3.0 We have raised this with MS support but was redirected to GitHub instead.

This Get-PartnerCustomerSubscription does populate all existing customer's subscriptions (NCE, CSP legacy, Azure and Software Subscription) but it doesnt populate the Perpetual license. And I was wondering if there is other module that we can use to get this report done?

Appreciate if anyone can help me out.

Thank you, Christian Agacite

mprentice22153 commented 11 months ago

The Partner Center PowerShell module is no longer being maintained and it doesn't properly support NCE. You are better off moving to using the Partner Center APIs to get the data you want. It might take some effort to learn it but it's worth it. I finally made the leap this past summer and do not regret it at all, in fact I have access to more attributes that I couldn't get through the module, and other capabilities.

Having said all that, this page has some of the information you need via API. https://learn.microsoft.com/en-us/partner-center/developer/get-a-list-of-products-by-customer

In Postman, once authenticated etc., I queried this: {{BaseUrl}}/customers/{{customer_id}}/products?targetView=SoftwarePerpetual and it returned the list of products ... but without the quantities purchased. There is also the targetView=Software which returned a few more products.