lwhitelock / HuduM365Automation

Hudu Microsoft 365 Syncronisation Tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HuduHelper.psm1 odata.nextLink

CIIPres opened this issue · 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.