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!)

2 Likes

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

1 Like