79332680

Date: 2025-01-06 10:02:27
Score: 4
Natty:
Report link

I have the same issue, there two errors we get 401 for disconnection and 429 for throttling issues.

Used this to check for connectivity instead of disconnect/reconnect: { $context = Get-MgContext

if (-not $context) { write-host -ForegroundColor yellow "Connecting Graph"

Connect-MgGraph -ClientId $ClientID -TenantId $TenantID -Certificate $ClientCertificate -NoWelcome

} else {

 write-host -ForegroundColor yellow "Graph already connected"

} } Used this to help throttle the requests when in a loop:

{ #Anti-throttling control Start-Sleep -Milliseconds 300 } I think they are related issues where the backend SP server is kicking out connections when overused without throttling.

Reasons:
  • Blacklisted phrase (1): I have the same issue
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): I have the same issue
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Cathal