WorkOS.DirectoryUserWithGroups (WorkOS SDK for Elixir v3.0.1)

Copy Markdown View Source

DirectoryUserWithGroups model.

Deprecated fields

  • :raw_attributes — The raw attributes received from the directory provider.
  • :groups — The directory groups the user belongs to. Deprecated: starting May 1, 2026, this field returns an empty array by default for newly created teams. Existing teams currently depending on this field should migrate to the new access pattern for better throughput performance — the field is unbounded by user, so users with many group memberships produce large, slow response payloads. Use the List Directory Groups endpoint with a user filter to fetch a user's group memberships.
  • :emails — A list of email addresses for the user.
  • :job_title — The job title of the user.
  • :username — The username of the user.

Summary

Types

t()

@type t() :: %WorkOS.DirectoryUserWithGroups{
  created_at: String.t(),
  custom_attributes: %{optional(String.t()) => term()},
  directory_id: String.t(),
  email: String.t() | nil,
  emails: [WorkOS.DirectoryUserWithGroupsEmail.t()] | nil,
  first_name: String.t() | nil,
  groups: [WorkOS.DirectoryGroup.t()],
  id: String.t(),
  idp_id: String.t(),
  job_title: String.t() | nil,
  last_name: String.t() | nil,
  name: String.t() | nil,
  object: String.t(),
  organization_id: String.t(),
  raw_attributes: %{optional(String.t()) => term()},
  role: WorkOS.SlimRole.t() | nil,
  roles: [WorkOS.SlimRole.t()] | nil,
  state: WorkOS.DirectoryUserWithGroupsState.t(),
  updated_at: String.t(),
  username: String.t() | nil
}