You're having to make 2700 requests to get each thing, having first got a list of the things. This sounds like a classic "1 + n" problem for REST APIs. Are you able to use GraphQL to get everything in one request? It looks like Microsoft experimented with that, see https://github.com/microsoftgraph/graphql-demo.