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

Subscriptions coming as empty #390

Open keerthijakkm opened 2 years ago

keerthijakkm commented 2 years ago

Using the below power shell commands to fetch subscriptions and powershell authentication is happening with refresh token but subscription is coming as empty.

Azure AD App will take consent from MSP to fetch his /her customer details. So will use partner tenant refresh token to fetch details. Same app fetching consent for other partners. But not working 2 or 3partners. I am not able to figure out why.

Please help with this.

"query1": "\n $getMsolAccountSku = Get-MsolAccountSku -TenantId 'ee8ce592-3f7e-4086-9457-7c7c2ae8d8c5' -ErrorAction SilentlyContinue | select AccountSkuId,\n SkuPartNumber,ActiveUnits,ConsumedUnits,WarningUnits,SuspendedUnits | ConvertTo-Json \n if(\n $getMsolAccountSku -eq $Null){ConvertTo-Json @()}else{$getMsolAccountSku} \n\n ", "query2": "\n $getMsolSubscription = Get-MsolSubscription -TenantId 'ee8ce592-3f7e-4086-9457-7c7c2ae8d8c5' -ErrorAction SilentlyContinue | select Status,\n DateCreated,TotalLicenses,SkuPartNumber,NextLifecycleDate,OcpSubscriptionId,\n SkuId | ConvertTo-Json \n if($getMsolSubscription -eq $Null){ConvertTo-Json @()}else{\n $getMsolSubscription} \n\n ",