An enrollment is a user's registration for a factor, for example their password, email address for One-Time Passwords, authenticator app or account with an identity provider. Users authenticate with their enrollments, and each enrollment adds the factor's score to the session. This page covers enrollments from a user's perspective. See Factors for how enrollments work per factor.
Users get enrollments in following ways:
https://{tenant_id}.account.quasr.io/factors, or through the createEnrollment operation of the Management API with an account scope.createEnrollment operation of the Management API or the create-enrollment tool of the Agent API. Other users enroll themselves. Only admins can create enrollments for restricted factors.A new enrollment is PENDING until it's validated, e.g. when the user enters the One-Time Password sent to their email address, after which it becomes ENABLED. A pending enrollment that isn't validated in time expires (expires_at) and is deleted.
https://{tenant_id}.admin.quasr.io/accounts/{account_id}/factors.getEnrollment and listEnrollments operations can be used, e.g. with filter { "account": { "eq": "{account_id}" } }. Admins can retrieve the enrollments of all users, accounts (with an account scope) only their own.get-enrollment and list-enrollments tools can be used.id: string) - The ID of the enrollment.account: string) - The ID of the user the enrollment belongs to.factor: string) - The ID of the factor, with its subtype (subtype: string), e.g. otp:email.label: string) - Textual label shown in the Login UI and Account UI.score: number) - The score the enrollment adds to the session, taken from the factor.status: string) - One of following: PENDING - The enrollment still needs to be validated.ENABLED - The enrollment can be used to authenticate.DISABLED - The enrollment can't be used, but can be enabled again.LOCKED - The enrollment is temporarily locked after too many failed attempts, or because its factor or user was disabled or locked. See Locking.attempts: number) - The number of consecutive failed or pending attempts, which locks the enrollment when it reaches the maximum.output: string) - Output of the factor when creating or updating the enrollment, e.g. the authorization URL to complete an identity provider enrollment.expires_at: string) - When a pending enrollment will be deleted if it isn't validated.config: object) - The factor configuration that applies to the enrollment, e.g. whether it's internal or restricted, its maximum attempts and, for key-based factors, its public key.Enrollments can be updated with the updateEnrollment operation (update-enrollment tool) and deleted with the deleteEnrollment operation (delete-enrollment tool), or in the Admin UI and Account UI.
DISABLED) or delete enrollments.ENABLED or DISABLED.Common tasks are:
Admins can search the enrollments of a factor by their value, for example to find the user with a given username, email address or phone number. Searching enrollments requires an admin scope (https://api.quasr.io/scopes/admin, .../scopes/admin/enrollments or .../scopes/admin/enrollments/search), see Authorization. Following applies:
The parameters are:
factor: string) - The ID of the factor to search (required).value: string) - The full value to search for, e.g. the email address (required).filter: object) - Additional conditions on the enrollments, e.g. { "status": { "eq": "ENABLED" } }.limit: number) - The maximum number of enrollments to return, 25 by default and at most 100.nextToken: string) - The nextToken of the previous response, to get the next page.The enrollments are returned with the properties above, and can be used to look up the user (account). Enrollments can be searched in following ways:
https://{tenant_id}.admin.quasr.io/factors/{factor_id}/enrollments, with the Filter button.searchEnrollments operation of the Management API, as in following example.search-enrollments tool of the Agent API.query { searchEnrollments(factor: "{factor_id}", value: "jane@example.com", limit: 1) { items { id account factor status } nextToken }}nextToken, e.g. when a filter excludes enrollments. Keep requesting the next page until no nextToken is returned before concluding there are no (more) matches. To search the value of an attribute instead, e.g. a customer number, see Attributes — Search.