Whats wrong with my code? I get Forbidden when i try to run the Get-PartnerCustomerSubscription part.:
Import-Module-Module -Name PartnerCenter -Scope CurrentUser
Connect-PartnerCenter -Scope
$customers = Get-PartnerCustomer
foreach ($customer in $customers) {
Write-Output "Customer: $($customer.CompanyProfile.CompanyName)"
Write-Output "CustomerId: $($customer.CustomerId)"
$subscriptions = Get-PartnerCustomerSubscription -CustomerId $customer.CustomerId
Write-Output $subscriptions
}
Im trying to get every subscription from all the tenants we have partner connection for. Im a global admin in my tenant.