Skip to main content

User Queries

The User API provides queries to retrieve user information.

Get User

Get a user by their SSO ID.

Query Structure

query GetUser($ssoId: String!) {
user(ssoId: $ssoId) {
bio
email
emailOnMention
image
isSsoUser
isAPIUser
name
ssoId
ssoType
}
}

Input Fields

FieldTypeDescription
ssoIdString!The SSO ID of the user to retrieve

Return Type

FieldTypeDescription
bioStringUser's biography
emailStringUser's email address
emailOnMentionBoolean!Whether the user receives email notifications when mentioned
imageStringURL of the user's profile image
isSsoUserBoolean!Whether the user is authenticated via SSO
isAPIUserBoolean!Whether the user was created through the API
nameStringUser's name
ssoIdStringUser's SSO identifier
ssoTypeSSOTypesType of SSO authentication

SSOTypes Enum

ValueDescription
SSOGeneric SSO authentication
SSO_SAMLSAML-based SSO authentication
SSO_OIDCOpenID Connect-based SSO authentication

Get All Users

Get all users in the board.

Query Structure

query GetUsers {
users {
bio
email
emailOnMention
image
isSsoUser
isAPIUser
name
ssoId
ssoType
}
}

Return Type

Returns an array of User objects with the fields specified in the query.

Error Handling

The User API requires proper authentication and will return appropriate error messages if:

  • The API key is invalid
  • The SSO type header is missing
  • The user does not exist
  • The user does not have permission to access the data

Common error scenarios:

{
"errors": [
{
"message": "Invalid Api Key",
"extensions": {
"code": "UNAUTHENTICATED"
}
}
]
}
{
"errors": [
{
"message": "ssotype is required in headers",
"extensions": {
"code": "BAD_REQUEST"
}
}
]
}
{
"errors": [
{
"message": "User not found",
"extensions": {
"code": "NOT_FOUND"
}
}
]
}