How do I get all the teams in a workspace but only those where I'm a member of.

I’m trying to use the API with Javascript to get a list of all the Teams in a workspace, but only those where the user that’s request are a member of. Is this possible?

Hi @p-g,

No, the API doesn’t have that type of filtering capability; you’ll have to get all of the teams, then check the team memberships for each on your end.

Thanks for the reply. Will have to think about a workaround in a large Org with too many teams.

Maybe you’re looking for this?

https://developers.asana.com/docs/get-teams-for-a-user

It will return the teams your user is member.

GET /users/{userId}/teams

1 Like

Oooh, good catch, thanks @Frederic_Malenfant , I totally forgot about that one!

1 Like