Skip to content

Client applications

Who can do this: tenant admins and user admins; admin access, and relations to users who hold a role, are tenant admins' only.

A client application is an application allowed to call the ContentSurface API. Every request it makes is on behalf of a user, so it never sees more than some user may see. There are two kinds, chosen when you register it.

Kind What it is How it gets tokens
Login client An application people sign in through — the Portal is one; a custom portal or an admin tool can be another. People sign in on your tenant’s sign-in page; the application uses the authorization code flow with PKCE. No secret.
Impersonating client A server application that acts for users without them signing in to ContentSurface — an intranet search, an assistant. With a client secret, it exchanges for a token for one related user at a time.
  • Admin access (login clients, set by tenant admins). Without it, people signing in through the client reach content only, even if they hold admin roles. The Portal has it.
  • Relations (impersonating clients). By default a client may act for nobody. Relate it to users, or to groups — then it may act for the group’s members who hold no role. Relating it to a user who holds a role is a tenant admin’s decision.
  • Labels, never roles. An impersonating client reads with the labels of the user it acts for and never reaches admin endpoints.
  • Secrets (impersonating clients). At most two, so one can replace the other without downtime. ContentSurface keeps only a hash: a secret is shown once, when created.

The Client applications page with the Portal’s system client and Register client

  1. Open Client applications and choose Register client.
  2. Choose the kind login, enter a Name, an optional Description, the Redirect URIs — exact addresses: HTTPS, or HTTP to localhost, no fragments; press Enter after each — and a Reason.
  3. Register. The client’s page shows its Client ID, which the application sends to the sign-in endpoints.
  4. Tenant admins: switch Admin access on if the application administers the tenant.
  1. Register client, kind impersonating, with a name and reason.
  2. On its page, under Secrets, choose New secret, optionally with an expiry date. Copy the secret now — it is the only time it is shown — and store it in the application’s secret store, with the Client ID.
  3. Under Users it may act for or Groups whose members it may act for, add the users or groups, with a reason.

To rotate a secret, create the second one, deploy it to the application, then delete the first. Tokens already issued with a deleted secret work until they expire.

  • More → Disable stops the client at once: no new tokens, sessions end, and tokens an impersonating client holds fail on their next request. Its secrets and relations are kept for Enable.
  • Delete removes the client with its secrets and relations.
  • More → Change history shows its audit log entries.

The Portal is a system client and cannot be changed.

  • Both secret slots are used: delete the older secret first.
  • Admin access is for login clients only: an impersonating client can never administer.
  • The application gets “not found” for a user: the client is not related to that user or their group, the user holds a role and was related only through a group, or the user is suspended.
  • A redirect URI is refused: it must be HTTPS (HTTP only to localhost) and have no # fragment.

For the API side — the token exchange and the sign-in flow — see OAuth and tokens.

In the API

The Portal does this through these calls; an integration can make them directly.

OperationCall
Client applications, by name, keyset-paged.GET /v1/admin/clients
Registers a login client (redirect URIs, PKCE) or an impersonating client (secrets, token exchange). The kind is fixed.POST /v1/admin/clients
A client application with its OAuth client_id; the ETag is its version.GET /v1/admin/clients/{id}
Changes name, description and a login client's redirect URIs; those of a client with admin access are a tenant admin's.PATCH /v1/admin/clients/{id}
Gives or takes a login client's admin access (the cs.admin scope). Tenant admins only.PUT /v1/admin/clients/{id}/admin-access
Disables a client: no tokens or refreshes; impersonated tokens fail on their next request.POST /v1/admin/clients/{id}/disable
Enables a disabled client.POST /v1/admin/clients/{id}/enable
Deletes a client: secrets, relations and outstanding grants removed (tombstone).DELETE /v1/admin/clients/{id}
An impersonating client's secrets by slot: hint, expiry and last use, never the secret.GET /v1/admin/clients/{id}/secrets
Creates a secret in the free slot and returns it once.POST /v1/admin/clients/{id}/secrets
Deletes a secret; tokens already issued live at most their lifetime.DELETE /v1/admin/clients/{id}/secrets/{slot}
Users the client may act for directly, keyset-paged.GET /v1/admin/clients/{id}/users
Adds and removes client–user relations; relating to a role holder is a tenant admin action.PATCH /v1/admin/clients/{id}/users
Groups whose members holding no role the client may act for.GET /v1/admin/clients/{id}/groups
Adds and removes client–group relations.PATCH /v1/admin/clients/{id}/groups