Hello,
We are using the users API (GET /workspaces/{workspace_gid}/users) and the response comes perfectly. But, when we use another endpoint (GET /users), some users e-mail comes in the place of name field. Here’s an example:
The json response when calls GET /users: {“gid”:“120**********164”,“name”:“thais.cruz@company.com.br”,“resource_type”:“user”}
The json response when calls GET /workspaces/{workspace_gid}/users: {“gid”:“120**********164”,“name”:“Thais Cruz”,“resource_type”:“user”}
Here’s the same user on Asana app:

There’s some explanation for this difference?
1 Like
Hi @Workflow,
I experience the same thing and am actually in the process of discussing this with one of my contacts at Asana; will let you know the outcome here.
4 Likes
I am wondering if it isn’t related to the fact that they recently changed the fact that when invited into another workspace/org, you lose your picture and name and have to type it again. Meaning they don’t store a unified profile anymore somehow…
(@Phil_Seeman maybe that can help with your analysis)
1 Like
Yes, @Bastien_Siebman, in my case, the users were in two workspaces - in one of them, the name field returns the name, in the other, the name field returns the email address. So it might be related to what you’re mentioning.
@Workflow, in your case, is that user in multiple workspaces?
1 Like
No, the users with this issue joined the company a few days ago and they joined in only one workspace.
Interesting - OK, thanks for this info. Will let you know if I have any updates to share on this.
1 Like
Hi @Workflow,
The Asana Developer Relations team looked into this and has some info on it; they’ll be posting that here shortly.
Ok, @Phil_Seeman. Thanks!
Hi @Workflow,
My name is Jeff and I’m on the DevRel team at Asana. Sorry for the confusion here and thanks for bringing it to our attention.
I looked into the API code and we default to email if the profile info doesn’t have a name. The profile info comes from the domain user, so my guess is that when a request is being made outside a domain context (i.e. via /users without filtering on a workspace), there is no profile info.
As an experiment, I tried setting my name differently in two domains and it is possible. So I believe that when making a request against /users, the API uses the email as the name value in the response if there is no name. The email is guaranteed to be the same for the domain user regardless of domain, but their name can be different based on which domain they’re in.
3 Likes
I am using the Python code below to extract the names of assignees. In some cases the names are returned as the assignees full name from the user profile (eg. Jack Gallagher), in other cases the names are returned as the users email address. (eg jack.gallagher@westernlettings.co.uk). From my experiments, it looks like Asana has populated the assignee name field differently for different users. The more recent users in our organization have the email variant.
I’m hoping someone has a suggestion that will enable me to have the assignee name fields consistently populated.
# Get the assignee
#
gid = task['assignee']['gid']
user = client.users.find_by_id (gid, {}, opt_fields=['name'])
listOfNames.append (user['name'].partition(' ')[0])
The default value is the email, and when a user accesses their profile settings for the first time they can edit it and fill in their name.
Hi Bastien. There are only two members on our team where the API call return their email address, but they have filled out their names in their profiles. I can’t find any difference between the members which return email addresses in the ‘name’ field and those that return their name. The main difference is that they were the last two who joined us. All suggestions welcome.
And you are 100% sure they show up with their name in the app? Because I realized one thing: uploading your picture is auto-save, changing your name isn’t. Which mean they could have changed their names but not saved it…