Issue with get_tasks_for_project Returning Inconsistent Results

Hi @Wiktor_Jurek,

are there any known limitations with the service account token and accessing tasks across projects

Not that I know of. If anything, it should have more permissions than a regular Personal Access Token (PAT).

Are you still experiencing this issue?

I tried to reproduce this issue by:

  1. Creating a project with multiple sections (e.g., 3 sections)
  2. Adding tasks to the sections in the projects (e.g., 7 tasks)
  3. Generated a Service Account Token
  4. Made an API call to the Get tasks from a project endpoint both via Postman and the python-asana client library (v5.0.10 and v5.0.11) changing the limit query param from 1-10 than tried query limit 100
  5. Did not run into the same issue as you did

Also, note that pagination is handled by default with the python-asana client library so you do not need to provide a limit query param. When you provide a limit query param what it does is change how the python client makes API calls to Asana. By default, the query limit is 100 if you don’t specify anything if you specify 5 for example in the background the python client will make API calls with page limits of 5 and stitch them together into a paginated result.

Could you please try testing again to see if the issue persists? If you still encounter the problem, could you provide additional details about your setup? This will help us reproduce and troubleshoot the issue more effectively.