Skip to main content

Get an identity

identity returns one identity, looked up by its Owlie id or by its email. The caller needs the identity.read permission.

query GetIdentity($id: ID, $email: String) {
identity(id: $id, email: $email) {
id
type
status
display_name
email
title
department
lifecycle_state
manager {
id
display_name
}
groups {
id
name
}
custom
}
}

Variables:

{ "id": "019d1f36-0000-7000-8000-000000000005" }

Send exactly one of id and email. Sending both is refused with a ValidationError, and sending neither fails.

The response holds the identity:

{
"data": {
"identity": {
"id": "019d1f36-0000-7000-8000-000000000005",
"type": "HUMAN",
"status": "ACTIVE",
"display_name": "Ava Moreau",
"email": "ava.moreau@acme.example",
"title": "Account Executive",
"department": "Sales",
"lifecycle_state": "HIRED",
"manager": {
"id": "019d1f36-0000-7000-8000-000000000009",
"display_name": "Morgan Lee"
},
"groups": [{ "id": "019d1f37-23f3-724a-b34d-70a48dd47f72", "name": "Sales" }],
"custom": { "badge_number": "B-4471" }
}
}
}

What the fields hold​

  • type is HUMAN or SERVICE_ACCOUNT, and status is ACTIVE or DISABLED. status says whether the identity can use its Owlie account. lifecycle_state is the separate employment stage described in Lifecycle state and overrides.
  • custom is an object holding your organization's custom attributes, keyed by attribute key.
  • manager is the manager's identity, and manager_id its id alone. Either is null for an identity with no manager.
  • Any profile field can be null. The schema reference lists them all.

When nothing matches​

An id that belongs to no identity in your organization answers "identity": null with no error. Ids are scoped to the organization: an id from another organization is unknown here.

A lookup by email returns the one identity that has that address, or null. If more than one identity has it, Owlie does not choose between them: the query fails with the code AMBIGUOUS_IDENTITY_EMAIL and status 409. Look those identities up by id instead.

To find identities by other fields, use the identities list with a filter, as described in How to use the API.