During OneDrive migration you notice the following error in the events:
"Skipping OneDrive item 37474 due to unexpected error."
followed by similar details:
Microsoft.SharePoint.Client.CollectionNotInitializedException: The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
at Microsoft.SharePoint.Client.ClientObjectCollection`1.d__3.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Azure_Functions.OneDrive.ListItemSurrogate..ctor(ListItem item, Boolean includePermission, Boolean includeAuthor) in D:\jenkins-agent\workspace\Build Release Candidate\Source Code\Functions\wwwroot\OneDriveProcessing\OneDriveClasses.cs:line 541
at lambda_method(Closure , ListItem )
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Azure_Functions.OneDrive.SPMigrationClient.LoadItems(Int32[] itemIds, Boolean skipPermissions) in D:\jenkins-agent\workspace\Build Release Candidate\Source Code\Functions\wwwroot\OneDriveProcessing\SPMigrationClient.cs:line 181
at Azure_Functions.OneDrive.OneDriveEnumFiles.LoadSplitPage(ISPMigrationClient client, Dictionary`2 errors, List`1 result, Int32[] ids, Int32 pageSize, OneDriveEnumRequest input, Stopwatch timeElapsed, TraceWriter log, ListItemCollectionPosition itemPosition, Boolean& needToSkipPermissions, Boolean skipPermissionsBeforeRerun) in D:\jenkins-agent\workspace\Build Release Candidate\Source Code\Functions\wwwroot\OneDriveEnumFiles\OneDriveEnumFiles.cs:line 640