-
Notifications
You must be signed in to change notification settings - Fork 60
Cannot get tenant subscription list if tenant has an expired subsctiption. #394
Comments
Having this exact issue as well. Suspending the subscription doesn't seem to fix this and I'm unable to cancel the expired subscription. |
@aunCoreyGood I've ended up implementing the calls I need myself as separate functions
Get-MSAccessToken is specific to my environment, but once you've implemented a way to get a token all the rest is fairly easy. |
On a similar note, the BillingCycle 'Triennial' isn't supported by the powershell module so anything that involves getting details of a product that supports that billing type will fail. |
Having the same issue. The Expired subscription is showing in the Debug output, but the module does not know how to handle the expired status it seems. |
Any chance this is going to get fixed soon? |
I sure hope so - I have this issue as well |
Also encountered this. David's workaround works well though. Thanks. If anyone needs a token for unattended access: $token = (New-PartnerAccessToken `
-ApplicationId $pcClientId `
-Credential $pcCreds `
-Scopes "https://graph.windows.net/.default" `
-ServicePrincipal `
-Tenant $pcTenantId).AccessToken
[securestring]$ssToken = ConvertTo-SecureString $token -AsPlainText -Force |
I can't believe this is still an open issue almost two years on. We are also seeing this same issue if any subscriptions are in the "Disabled" state, or if the BillingCycle is "Triennial". This is causnig us to not be able to do a full subscription export via PowerShell. |
@ngailloux-softlanding Last release was 3 and a half years ago, I think it's pretty clear that this module has been abandoned now. Unfortuantely Microsoft's documentation still directs people to it in quite a few places. I've ended up building a module with all the functionality we need myself, once you've set up the necessary stuff for authentication the majority of the calls are very straightforward to implement. |
As @DavidMoore-intY said, the PartnerCenter module is abandoned. It would be best to switch to using the APIs and modernizing your scripts. You will find more fields available to you and also not encounter the broken functionality described here and elsewhere. The New-PartnerAccessToken cmdlet was the last one I held onto from the old module but now have a replacement for that using APIs. This is unfair of me to say: I would share with you what I have created but for now I'm too buried with projects to spend time cleaning up my code so I'm comfortable sharing it. Over a year ago I started with getting authentication working, then I've built my own module of customer functions to replace the old module. As necessary I add a new function and keep moving on. As @DavidMoore-intY said, most are straightforward to implement. |
Steps to reproduce
Run 'Get-PartnerCustomerSubscription' against a tenant with an expired subscription
Expected behavior
List of subscriptions on the tenant is returned
Actual behavior
Get-PartnerCustomerSubscription : Requested value 'Expired' was not found.
At line:1 char:2
Diagnostic logs
Running with -debug shows data being returned from Microsoft as expected.
Logs not included as it is a live customer tenant.
Environment
PSVersion 5.1.18362.1801
PSEdition Desktop
ModuleType Version Name
Script 3.0.10 PartnerCenter
The text was updated successfully, but these errors were encountered: