I've written a console app, that will be used to upload files to an Office 365 Unified Group. I'm using the Microsoft Graph API to get a reference to the drive under the group, and then upload files. I am using the Microsoft.IdentityModel.Clients.ActiveDirectory NuGet package for Authentication. This application needs to upload several thousand files, and I believe that I'm encountering some throttling issues.
I am able to upload around 4000 files without any issues, but after that I begin to get 401 "Unauthorized" responses. At first I thought it was a token expiration issue, but I changed my code to get a brand new token if a 401 is encountered. I didn't initially suspect throttling issues, because I am not getting a 429 reponse error code (see: https://github.com/OfficeDev/microsoft-graph-docs/blob/master/content/overview/errors.md).
Is it possible that too many requests to the Microsoft Graph API in some period of time could result in 401 Unauthorized error response messages?
I'm making the upload requests sequentially (not in parallel), and I've added a 1 second pause between each request.