Assignee names not stored conistently

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

A post was merged into an existing topic: Inconsistence between endpoints

Hi @Jack_Gallagher1,

I moved your post to an existing thread on this topic. See especially Jeff Schneider’s post there for more info.