Skip to content
Endpoint ManagementMarkdown

Device limits

Cap how many devices a realm may enroll, and how long an enrollment token may be spent.

AvailableAPI

Two settings keep enrollment in bounds. The device cap stops a realm from growing past the number of devices it is meant to have, however many tokens are handed out. The token lifetime keeps a token that leaks from being useful for long.

  • Privilege: reading the settings needs READ on the realm’s endpoint settings, which RealmViewer and RealmOwner hold; changing the token lifetime needs MODIFY, which RealmOwner holds (Who can call). Only an administrator of the root realm can change the device cap.
  • Where: the API.
SettingFieldDefaultRangeWho sets it
DevicesmaxDevices1001 and upAn administrator of the root realm only
Enrollment token lifetimeenrolTokenTtlHours24 hours1 to 168 hours (a week)The realm’s administrators

The device cap is checked before anything of an enrollment is made: an enrollment past the cap registers nothing, records nothing, and is refused with 409. The cap holds even when many devices enroll at once.

The token lifetime is the lifetime a token gets when its maker names none, and the longest one they may name. A ttlHours of zero, below zero, or past the realm’s setting is refused with 400.

Both are fields of the realm’s endpointSettings settings object (Call the API). To keep tokens to eight hours:

Terminal window
curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/endpointSettings/endpointSettings \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
-H "Content-Type: application/json" \
-d '{"enrolTokenTtlHours": 8}'

Read the current values with a GET on the same address.

At the cap, enroll on the device is refused, and prints:

enrol failed: enrol refused, 409 Conflict: {"code":"DISABLED","message":"the realm enrols its most devices, 100","detail":null}

The token isn’t spent: once there’s room, the same token enrolls the device while it lasts.

StatusWhenWhat to do
400 on making a tokenttlHours is below 1 or past the realm’s lifetime; the answer names the rangeAsk for a lifetime within it, or leave ttlHours out
400 on the settingsA value outside its range, such as a lifetime past 168Keep to the ranges above
403 on the settingsYou lack MODIFY here, or you changed maxDevices from a realm other than the rootAsk a root realm administrator to change the cap
409 on enrollingThe realm is at its capRemove a device you no longer need, or have the cap raised
WhatDefaultRangeCan it be raised
Devices per realm1001 and upYes, by an administrator of the root realm
Enrollment token lifetime24 hours1 to 168 hoursUp to 168 hours, by the realm’s administrators
SymptomCauseFix
Enrollments are refused at the cap, but you removed devicesA removal frees its place only once it has finishedRead the removed device’s record until it answers 404, then enroll (Device removal)
Enrollments are refused at the cap, with fewer devices in use than the capOld records from devices enrolled again are still countedRemove the records of devices enrolled again (Enroll a device again)
A token request for a week is refusedThe realm’s lifetime is shorterRaise enrolTokenTtlHours, or ask for less

Each change to the settings is recorded on the realm’s audit trail as a change to endpointSettings, with who made it and the values before and after. Read it at https://foobar.cvyuh.com/api/v0/am/objects/v1/endpointSettings/endpointSettings/history; see Change history.

  • The cap is the root realm’s. A realm’s own administrators can read it but not raise it, so a deployment can allot devices per realm.
  • Changes apply to new enrollments only. Lowering the cap below the devices you have removes no device; it stops new ones until the count is under it again. A shorter lifetime doesn’t shorten tokens already made.
  • A retry doesn’t count twice. A device retrying its own enrollment over the same key is answered without asking the cap again.
  • Removing a device frees its place once its removal has finished.
  • The field is spelled enrolTokenTtlHours, as the realm names it.