How to get Asana Licensed Users from Asana API

Hi Team,

We want to fetch the licensed users from Asana from the API. We are calling the following API to get list of members in a workspace. However, We are not able to get the correct information. We use the following 3 keys to filter licensed users

“is_active”: true,
“is_admin”: true,
“is_guest”: false,

However, There we get many users who show as inactive in Asana admin portal come up as is_active = true. Also, Many users who are shown as ‘guest’ in Asana admin portal are shown as is_guest = false.

We are not sure if we are hitting the correct Asana API endpoint. Is there a way in which we can identify the active and licensed users from Asana API data?

We are using the following API endpoint.

https://developers.asana.com/reference/getworkspacemembership

Did you ever solve this? We want to do a similar thing, I think. We need to generate a monthly list of licensed users, their teams, and their license tier.

Hi @Elleni_B_Fellows and welcome to the forum,

Try this endpoint to get a list of the users in a workspace and their license level:

https://app.asana.com/api/1.0/users?workspace={workspace_gid}&opt_fields=workspaces.contemporary_premium_tier

Some notes:

  • It leverages the undocumented parameter contemporary_premium_tier. It’s not 100% guaranteed that parameter will be available forever but I haven’t heard that it’s going anywhere.

  • The possible values for contemporary_premium_tier are:

    • tier-2-enterprise
    • tier-1plus-premium
    • enterprise
    • enterprise-plus
    • tier-1-premium
    • starter
    • null
  • This won’t tell you what teams each user is in; for that, you’d need to loop through each returned user and call the Get Teams for a user endpoint.

2 Likes

Hi @phil_sreeman

We called the endpoint and are getting ‘null’ values for all users in the ‘contemporary_premium_tier’ field.

Can you please help how we can interpret the data.

Thanks,
Chinmay

@ChinmayPanda - is it 100% of users that are showing as null, or just a large %? When I pull that for my environment, I see accurate data for every user in my org (it’s easy since we’re all on the same level…)

Do you have a free organization?

@John_Baldo Has the implementation of contemporary_premium_tier changed since we last talked about it? Or any thoughts on why it might be null for @ChinmayPanda 's users?

Hey, I don’t think that’s documented or reliable. We went through a pricing change recently and there may be more in the future which add more values, change the meaning of values, or cause this to stop working altogether. So I wouldn’t depend on that. It sounds like a feature request to get certain information, but I can look into is_active not working reliably.

Oh my apologies, @John_Baldo, for tagging you here - it was actually @Jeff_Schneider that told me about that property.

It was actually added when the new pricing model was released so it should theoretically be current.

So Jeff, what do you think here?

Hi, in terms of active vs inactive, a couple things which might help troubleshoot:

  • It’s possible for a user to be removed and then re-invited with the same email, but they may a different user gid (which would show in the API but not in the admin console)
  • In a “domain” admin console (most paid tiers), a removed user would appear the removed member will be shown in the “Removed” tab in Members page.
  • In a workspace admin console, a removed user would not appear in the admin console.

@John_Baldo Is there a way of current active users’ email and license tier from any Asana API?

Please share the API link and logic how we can interpret the data.