Organisation level API

Hello everyone,

Fairly new to the Asana API, but I’ve hit a bit of a wall I’m hoping someone can help with.

We have our own project management system which basically helps connect projects to clients, contacts, estimates and invoices, but we would like to link Asana into it so the tasks can be managed there too.

At the moment, we’ve managed to get it to create a new project in Asana when one is added in our system. But the difficulty we have at the moment is some user specific tasks aren’t showing, which I’m guessing relates to the personal access token being used.

Is there a way of getting all tasks for a specific user and project please?

Any help/pointers appreciated!

Sorry, it’s not clear - do you mean you created some tasks via the Asana UI and some of those are not being returned when you try to get them via the API; or you created some tasks via the API and some of those are not showing in the Asana UI?

I think if you can provide more specifics as to what you’re doing, and perhaps some code snippets, that would be helpful.

Hi @Phil_Seeman

Apologies if that wasn’t very clear - let me try again.

I may add a project to our system which then creates it on Asana via the API, and assigns whoever we select - for example, a colleague. If that colleague then logs into Asana and create a task that’s only visible to them in the UI, this isn’t pulled through when we query tasks on our side.

What I’m looking to achieve is have our existing system to be more of a centralised view of everything, so if I log into it, I can see my tasks for the project; if my colleague logs in, they can view their tasks for the same project.

My suspicions were that because it’s a personal access token, it’s only permitting me to view my tasks, which is why I wondered if there was a way to access the account through the API on an organisation level rather than a user level?

Of course, if I’m talking nonsense, then let me know - it’s highly likely I may have overlooked something!

You’re right - whether you use a Personal Access Token or you use OAuth to access your Asana data, you’ll only have access to that data which is accessible to the user who authenticates.

If you have an Enterprise-level subscription, you can use a Service Account token in place of the Personal Access Token and you’re all set.

Otherwise, you’ll need to make sure that the user whose Personal Access Token you use (or the user who you authenticate via OAuth) has access to the Asana data you need to access. You could do this using one of your real user accounts if you have a management-level user for whom it would be appropriate to give them access to all of your organization’s data; or you could create your own pseudo-Service Account by creating a new Asana user account that has the needed total access and is used only for API-access purposes. Of course if you do this latter option, you’ll be taking up a user slot for that pseudo-user which might cost you $$ if you’re on a paid plan, and also the pseudo-user will show in the Asana UI.

Let me know if any of the above isn’t clear or you have additional questions!