capabilities.work

Enroll a Device and Confirm It Checked In

A 5-step recipe with Google Android. We can help you get access.

Recipe · 5 steps

Enroll a Device and Confirm It Checked In

Issue an enrollment token for a known policy and verify the device enrolls against it.

  1. Read the policy the device will enroll onto. Enrolling against a policy name that does not exist yields a device stuck without configuration, so this is checked before a token is minted.
  2. List the enrollment tokens already outstanding for this enterprise so an operator can see whether a valid token exists before minting another.
  3. Mint a short-lived enrollment token bound to the confirmed policy. The qrCode value is what the factory-reset device scans.
  4. Poll the enterprise device list until the newly provisioned device checks in. Enrollment is asynchronous from the API's point of view, so this step is retried until a device is present.
  5. Read the enrolled device and confirm it applied the policy the token was bound to, rather than merely appearing in the fleet.
What you'll need to have ready
  • enterpriseName: The enterprise resource name (e.g. enterprises/LC0123abcd).
  • policyName: The full policy resource name the device should enroll onto.
  • tokenDuration: How long the enrollment token stays valid, as a duration (e.g. 3600s).
  • username: Optional account identifier to associate with the enrolled device.
For your developer

Arazzo workflow google-android:enroll-device, 5 operations: getPolicy → listEnrollmentTokens → createEnrollmentToken → listDevices → getDevice. Specs on APIs.io.