Added max list size circumvention for file transfers between sites.

This commit is contained in:
Dev
2026-05-13 15:58:16 +02:00
parent 4b51c8e3c3
commit 5d305ccc4c
27 changed files with 996 additions and 145 deletions
@@ -64,6 +64,7 @@ public class BulkMemberService : IBulkMemberService
return;
}
}
catch (OperationCanceledException) { throw; }
catch (Exception ex)
{
Log.Warning("Graph API failed for {GroupUrl}, falling back to CSOM: {Error}",
@@ -83,7 +84,7 @@ public class BulkMemberService : IBulkMemberService
{
// Resolve user by email
var user = await graphClient.Users[email].GetAsync(cancellationToken: ct);
if (user == null)
if (user?.Id == null)
throw new InvalidOperationException($"User not found: {email}");
var userRef = $"https://graph.microsoft.com/v1.0/directoryObjects/{user.Id}";
@@ -138,13 +139,16 @@ public class BulkMemberService : IBulkMemberService
}
}
}
catch { /* not a group-connected site */ }
catch (OperationCanceledException) { throw; }
catch (Exception ex) { Log.Debug("Group lookup not available for {SiteUrl}: {Error}", siteUrl, ex.Message); }
}
return null;
}
catch
catch (OperationCanceledException) { throw; }
catch (Exception ex)
{
Log.Debug("Could not resolve M365 group ID for {SiteUrl}: {Error}", siteUrl, ex.Message);
return null;
}
}