A cloud-based identity and access management service for securing user authentication and resource access
Several factors can cause the throttling you are experiencing. From the docs
It's possible to receive
429 Too Many Requestsresponses even when the following limits aren't reached, in situations when the services are under an important load or based on data volume for a specific tenant. The following table lists existing limits.
In your case since you actually got 429, its throttling so you have to ivestigate the requests a per this doc to find the resource unit cost of the requests progressively through the life cycle of your scrip[t execution. Avoid concurrency that will cause throttling. Note that sometimes even other requests like the group script if that run first will impac the RCU for the authentication methods.
You may also want to try batch requests where applicable instead of concurrency.