Get a user
GET/users/:username
Returns one user.
This is not an expanded form of what GET /users lists. That endpoint
answers with Prism's own four-field summary; this one answers with the
directory's representation of the user, under different field names. Code
that consumes both needs to handle two shapes.
The body of this response is the directory's own administrative user representation, passed through unmodified. Prism does not map it to a shape of its own, so its exact field set depends on the version and the configuration of the directory behind your deployment, and additional fields may be present that are not listed here. Treat the response as sensitive: do not log it, and read only the fields you need.
Request
Responses
- 200
- 401
- 403
- 404
- 500
The user.
Authentication failed: the X-API-Token header was missing, malformed,
expired or not recognised.
This response is text/plain, not JSON. It is written by
http.Error in the authentication middleware, which runs before any
handler and therefore before anything that would build a JSON envelope.
A client that unconditionally JSON-parses response bodies will fail on
this one, so check the status code first.
The token is valid, but it is not allowed to act on this tenant.
An API token is minted inside one tenant and stays bound to it for life.
Sending it to a path whose tenant segment names a different tenant is
refused here, in middleware, before the operation runs, so this says
nothing about the resource you asked for, only about which tenant the
path named. Check the tenant server variable against the console the
token was created in.
No user in your tenant has this username or this email address. Nothing distinguishes a user who never existed from one who has been deleted, or from a user who exists under a different tenant.
The user could not be read from the directory.