Connected Apps

Summary

Every approved consent creates a grant — a connection between a user and a client. Core exposes endpoints to list the current user's connections and to disconnect one, so your app can offer a "Connected apps" settings screen.

Both endpoints require an interactive user session (a normal signed-in Core JWT). Personal access tokens and delegated-app tokens cannot manage connections.

List connections

GET api/oauth/connected-apps
Authorization: Bearer <user's Core JWT>

Returns the user's grants, newest first:

Field Description
id The grant id — pass it to disconnect
clientId The client's self-encoded id
clientName Display name from the client's registration
scopes All granted scopes, including plumbing scopes
accessLevels Human-readable data-access descriptions (e.g. "Read data") — plumbing scopes are excluded
connectedAtUtc When the user approved the connection
status Active, Disconnected, Inactive, Redeemed, or Rejected

Disconnect

POST api/oauth/connected-apps/{grantId}/disconnect
Authorization: Bearer <user's Core JWT>

Revokes the grant and every token issued under it — access and refresh tokens stop working immediately, and a refresh attempt returns invalid_grant. Users can only disconnect their own grants; anything else is refused.

Notes

  • Stateless clients have no stored registration, so the grant itself carries the client identity (clientId, clientName) in its properties.
  • Connecting the same client twice creates two independent grants; disconnecting one leaves the other active.
  • The tokens issued under a grant reference it via the oauthGrantId claim — that is how revocation reaches them.
  • The reference UI lives in the Benevia ERP frontend: Pages/Settings/Company/ConnectedApps.razor.