Private User in /workspaces/<workspaceId>/users endpoint


#1

Hi,

I’m seeing some strange behaviour with the Asana workspace users endpoint. Specifically, when I make a GET request to /workspaces//users, the list of users includes one user with a null email address.

Here’s the full request and response:

`GET https://app.asana.com/api/1.0/workspaces/8691139927938/users?opt_fields=email,name

HTTP/1.1 200 OK

{
“data”: [
{ … },
{
“email”: null,
“gid”: “742854212074500”,
“id”: 742854212074500,
“name”: “Private User”
},
{ … },
]
}`

If I make a GET request to get that single user’s details, the email address is correct:

`GET https://app.asana.com/api/1.0/users/742854212074500?opt_fields=email,name

HTTP/1.1 200 OK

{
“data”: {
“email”: “”,
“gid”: “742854212074500”,
“id”: 742854212074500,
“name”: “”
}
}
`

If I delete that user’s account and sign up to Asana again with the same email address and invite them to the same workspace, the account ID changes, but the /workspaces//users endpoint still returns this user with a null email address.

Could it be that this particular account is unverified or somehow failed the Asana email verification flow (even though this is not indicated as such in their account) and therefore their details are showing as null and ‘Private User’ in the /workspaces//users endpoint to protect their privacy?

Or could it be that the invitation process to join the workspace somehow failed?

Why does the behaviour of this endpoint differ to the /users/ endpoint where the correct details are returned?

For any Asana employees reading this: I can provide the user’s email address in a direct message to help diagnose, if required.

Cheers,
James


#2

Hi @James1234,

Sorry to hear you’re having issues with this. I suspect that you’re seeing ‘Private User’ for users that are guests in your Asana Org.

Does the user you’re inviting have the same email domain as your Asana Org? If not, they will be added as a guest member. You can read more about how this works in the Asana Guide.

Asana users will also sometimes see other users have the name “Private User” in the Asana web app. This happens when both users are guests – they will see each other as “Private Users”. You can read about this behavior in this Guide article.

Hopefully, that helps clear things up.


#3

Hi @Jeff_Schneider

Thanks for your response and for the helpful links provided.

The user I’m inviting does indeed share the same email domain as the Asana org and the Asana API user. The web app also didn’t show any indications that the invited user was a guest.

I still think it’s strange how one endpoint showed the user as a ‘Private User’ with a redacted (null) email address whereas another showed the user’s full details. Both API calls where made using the same authorization. Any idea what would cause this?


#4

I’m reposting this because I messed up the formatting in my original post and the discourse edit button has been disabled preventing me from correcting it.