Skip to main content
Custom fields let you keep your own details next to a person or your organization, such as a customer plan, an employee number or a region. Your apps can read them, and public fields can be added to sign-in tokens.
Custom fields, the token template and the sign-in check are available on the Pro plan and above.

Three kinds of field

The person can change their own person fields to anything. Never use them to decide access.
Organizations have public and private fields. People have all three kinds.

Limits

  • Each kind is a JSON object, like {"plan": "gold"}.
  • Each kind holds at most 8 KB.
  • A top-level name starts with a letter and has only letters, digits and _, up to 64 characters.
  • Values nest at most 5 levels deep.
  • A write replaces each kind it names. Send an empty object to clear one. Kinds you leave out stay as they are.

In the console

  • A person’s fields: go to People, open the person, and find Custom fields. This needs Manage people, and you only see people whose role is within your own access. Changing public fields also needs Manage sign-in security, because they can reach tokens.
  • Your organization’s fields: go to Developers and find Organization’s custom fields. This needs Manage sign-in security.
People change their own person fields from their own account.

Through the admin API

Your server reads and writes fields with an API key.

Put fields in sign-in tokens

Under Developers → What sign-in tokens include, you can write one JSON template for your organization. It adds claims to the ID token and to /oauth/userinfo for every app, whatever scope the app asked for.
The placeholders you can use are:
  • user.id, user.email, user.first_name, user.last_name, user.public.*
  • org.id, org.slug, org.name, org.public.*
How values are filled in:
  • A value that is a single placeholder keeps its type. A number stays a number.
  • A placeholder inside other text becomes text.
  • A placeholder that finds nothing drops its key.
  • Private fields and person fields can never be used.
  • Claims Aiveth sets itself, such as sub, iss, aud, exp and the role claims, can’t be changed.
  • The template, and what it renders to, is at most 3 KB. A result over that adds nothing.
Every change to the template emails your Owners. See Tokens and claims for the claims Aiveth sets.