lwhitelock/HuduM365Automation

HuduHelper.psm1 odata.nextLink

CIIPres opened this issue · 0 comments

I believe there is an error in line 147 of the HuduHelper.psm1 file that prevents the retrieval of data when the 100 record limit has been exceeded.

The line as it currently exists:
$AdditionalValues = New-GraphGetRequest -ComplexFilter -uri $MoreData.body.'@odata.nextLink' -tenantid $TenantFilter

The correction:
$AdditionalValues = New-GraphGetRequest -ComplexFilter -uri $MoreData.body.'@odata.nextLink' -tenantid $tenantid

$TenantFilter does not exist in this context, so any time the requested record contains additional data, this function fails. $tenantid, however, is in context and is correct for the function to work.