How to get user roles for a project using the Asana API

Hello,

I am trying to use the Asana Python API library to get the project roles that appear on the Overview page when accessing a Project. I’m new to the Asana API and I couldn’t find anything related to this in the documentation or in the community forum.

Any help would be greatly appreciated, thank you!

2 Likes

Hi @Rares_Lungu and welcome to the forum!

The role field is undocumented in the API docs (cc: @AndrewWong, maybe you can add it?) but you can access it using the opt_fields option; see:

Note that it’s a property of a user’s workspace membership, not of a specific project, so you won’t be able to get it via a project-related call.

3 Likes

Hello @Phil_Seeman and thank you very much for the prompt reply.

I’ve followed your answered and tested it for my situation but unfortunately, it is not the same thing as what I was looking for.

For my use case, I’d like to get the project roles of all the project members, which are assigned at the project level (and which could technically be different from project to project within a workspace) rather than the roles set at the workspace level (which are unique for each workspace).

Do you know of any method call or endpoint that would return this information?

Thank you!

answer, sorry :blush:

Oh sorry, I missed that.

I’m sure that’s on the project_membership object but I don’t know of any way to get that (I just tried some ideas but came up empty).

@AndrewWong or @Ross_Grambo do you know of any way to get at that undocumented “project role” field via the API?

1 Like

Sorry, project roles aren’t exposed anywhere in the API yet :frowning:

3 Likes

That’s unfortunate but thank you very much for your reply!

Hi,

I just ran into this same issue. We have a script to keep Asana in sync with our other apps, and it would be a nice touch if the script could get/set user project roles.

Has this field been exposed through the API?

No, they haven’t exposed it as of this writing.

1 Like

+1 Nudge needing this - been a while is there any word on a plan or roadmap to address this gap?

Bump this as well; this would be a huge development for me right now.

Another great update would be for these roles to be attached to the roles in the task list, so if I update a role on the overview page the task assignments update along with it. This would be a great resource management workflow for updating assignments after the plan is created!

Hello,

I’m currently looking for this specific field (underlined in green) related to a project member’s role but I can’t seem to find it anywhere in the dev documentation.

I’m not even sure what it’s called to be frank, it’s just a text field where the project owner can give someone a title pertaining to their role in a a specific project.

We’re looking to use this to enhance our membership role analytic (i.e.: how many projects is John Smith a collaborator on, etc)

Does anyone have any idea of what it could be called, or which API fetch I could find it in?

Thanks!

Hi @Stephane_Caron,

Unfortunately that info is still not available via the API.

1 Like

Thanks Phil!