How to get user's role

Hello,

I’ve tried to retrieve a user’s role, which I edited in the admin console, but don’t know how.

Hi @Shintaro and welcome to the forum!

The reason you don’t find “role” on the User object is that a user’s role is actually defined at the workspace level, and so is workspace-specific (a user can have different roles in different workspaces).

It turns out you can retrieve a user’s role in a given workspace using this endpoint:

https://app.asana.com/api/1.0/users/1234567?opt_fields=role&workspace=4567890

(Hat tip to @Ross_Grambo for this info!)

3 Likes

I understood!! Now I’ve got a user’s role perfectly. Thank you for your support!

1 Like

“Role” doesn’t existe anymore, does it? I just tried, it doesn’t return anything and there is no box in the profile setting anymore. We have job title, and department.

It is not currently available in Asana’s API. I found that out through this thread and querying user objects via the API.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.