Added max list size circumvention for file transfers between sites.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user