AI-generated Key Takeaways
- 
          An EnrollmentToken is a resource used to enroll devices with a given enterprise. 
- 
          Enrollment tokens have a value that authorizes device enrollment and can have a specified duration and expiration timestamp. 
- 
          You can associate an initial policy and optional arbitrary data with an enrollment token. 
- 
          Enrollment tokens can be created, deleted, retrieved, and listed for a specific enterprise. 
Resource: EnrollmentToken
An enrollment token.
| JSON representation | 
|---|
| { "name": string, "value": string, "duration": string, "expirationTimestamp": string, "policyName": string, "additionalData": string, "qrCode": string, "oneTimeOnly": boolean, "user": { object ( | 
| Fields | |
|---|---|
| name | 
 The name of the enrollment token, which is generated by the server during creation, in the form  | 
| value | 
 The token value that's passed to the device and authorizes the device to enroll. This is a read-only field generated by the server. | 
| duration | 
 The length of time the enrollment token is valid, ranging from 1 minute to  A duration in seconds with up to nine fractional digits, ending with ' | 
| expirationTimestamp | 
 The expiration time of the token. This is a read-only field generated by the server. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:  | 
| policyName | 
 The name of the policy initially applied to the enrolled device, in the form  | 
| additionalData | 
 Optional, arbitrary data associated with the enrollment token. This could contain, for example, the ID of an org unit the device is assigned to after enrollment. After a device enrolls with the token, this data will be exposed in the  | 
| qrCode | 
 A JSON string whose UTF-8 representation can be used to generate a QR code to enroll a device with this enrollment token. To enroll a device using NFC, the NFC record must contain a serialized  | 
| oneTimeOnly | 
 Whether the enrollment token is for one time use only. If the flag is set to true, only one device can use it for registration. | 
| user | 
 This field is deprecated and the value is ignored. | 
| allowPersonalUsage | 
 Controls whether personal usage is allowed on a device provisioned with this enrollment token. For company-owned devices: 
 For personally-owned devices: 
 | 
| Methods | |
|---|---|
| 
 | Creates an enrollment token for a given enterprise. | 
| 
 | Deletes an enrollment token. | 
| 
 | Gets an active, unexpired enrollment token. | 
| 
 | Lists active, unexpired enrollment tokens for a given enterprise. | 
