Closed mightymietz closed 1 year ago
Hi, My initial thought process goes towards following the code flow of the 'DetailedCustomerList' variable that is providing the error that it's empty. As you've added that 40k customers have been found the 'CustomerList' variable that is definitely populated. The next region brings me to the filtering towards only the Azure customers and that makes me wonder: In your test of 50 customers, does line 242 that writes information on the amount of Azure customers that will be processed provide a number of that batch of 50 that is higher than 0?
Initial thinking would be that the first batch of 50 partner center customers coincidentally are not Azure customers, which would explain the empty list of detailed customer information. If not, we can investigate further of course. But it can be a starting thought.
Thanks for your reply! I did some further debugging. I set a breakpoint before writing the files to disk and found out that the $AzureSubscriptionList
only contains 6 entries out of 40339 customers. That is definetely wrong:
$DetailedCustomerList seems to be empty or null:
And this is the output:
Hi, because the Azure customer list is clearly populated (4822) I'm looking downwards from there. What throws me off a bit is the seemingly empty detailed customer list. As there is output for 6 entries it's puzzling that this is empty as everything related to secure score data retrieval builds on top of that list.
To summarize my thoughts into a question. In the data retrieval error list, I see there are 4816 items. I wonder if the 'DataRetrievalPrerequisitesIssueList' also has this large number of items. For both lists, what error category has the majority there?
Using the error category or message it could point towards the exact call that it causing the end result to be so limited. My guess based on the screenshots would be that the prerequisites issue list is also full with the 'ApplicationConsent' category as the main reason. This would cascade down towards the actual score data retrieval with failed token retrieval and so would show the 'FailedARMTokenRetrieval' error category in the data retrieval issue list. In this case the first action would be to verify the role of the authenticated partner center admin (admin agent).
Do let me know if that brings you closer towards the cause of the issue. Would've liked to be able to get back to you sooner, busy period between vacations
When running the script in our tenant with a total of [40203] customers on the partner center I get
Cannot bing argument to parameter 'InputObjectList' because it is null
when calling
Write-CSPObjectToFile -InputObjectList $DetailedCustomerList -OutputFolderName $DateTimeFolderName -OutputFileName 'Custopmerdetails.json'
Debugging is very time consuming since it takes roughly 10h to get to this point because of the huge number of customers and subscriptions.
I already capped the customers to 50 to get faster to that point. With that the script finishes. So I think the culprint is a faulty entry in the customers list or something related to that which the script does not take into account.
Any ideas?