Introduction
In the automation world, organizations are increasingly relying on Microsoft 365 for their email infrastructure. In this era of automation, it is very crucial to automate email management. Recently, I encountered an issue while developing a PowerShell script for email backup for the given users' OneDrive. The script involves deleting attachments from the mailbox, restoring them, and adding links to the mailbox with a folder URL to redirect to the actual attachment storage location. This script turned from simple automation to a deep dive into Microsoft Graph api concurrency handling.
In this blog, we will explore the reasons behind the concurrency issue and why PowerShell cmdlets fail, while the Graph REST API succeeds.