I am using a function app (new to me as well as the ServiceClient) to import data into D365 Online from a simple sharepoint excel file. The idea is that this function app will allow multiple creations.
I am using DI and trying to increase the throughput of insertions into dynamics by using parallel.froeachasync or task.whenall.
I am receiving in some instance - AADSTS50196: The server terminated an operation because it encountered a client request loop error:
One or more errors occurred. (Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.)'
Microsoft.PowerPlatform.Dataverse.Client.Utils.DataverseConnectionException: 'One or more errors occurred. (Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.)'
Any help would be great.
Added singleton and that haas helped but throughput falls even using ParallelForEach or task.whenall.
I would like to keep the high throughput but still maintain data integrity?