REST Resource: enterprises.enrollmentTokens
Resource: EnrollmentToken
JSON representation |
{
"name": string,
"value": string,
"duration": string,
"expirationTimestamp": string,
"policyName": string,
"additionalData": string,
"qrCode": string,
"oneTimeOnly": boolean,
"user": {
object (User )
},
"allowPersonalUsage": enum (AllowPersonalUsage )
} |
Fields |
name |
string
The name of the enrollment token, which is generated by the server during creation, in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId} .
|
value |
string
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 |
string (Duration format)
The length of time the enrollment token is valid, ranging from 1 minute to Durations.MAX_VALUE , approximately 10,000 years. If not specified, the default duration is 1 hour. Please note that if requested duration causes the resulting expirationTimestamp to exceed Timestamps.MAX_VALUE , then expirationTimestamp is coerced to Timestamps.MAX_VALUE . A duration in seconds with up to nine fractional digits, ending with 's '. Example: "3.5s" .
|
expirationTimestamp |
string (Timestamp format)
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 uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30" .
|
policyName |
string
The name of the policy initially applied to the enrolled device, in the form enterprises/{enterpriseId}/policies/{policyId} . If not specified, the policyName for the device’s user is applied. If userName is also not specified, enterprises/{enterpriseId}/policies/default is applied by default. When updating this field, you can specify only the policyId as long as the policyId doesn’t contain any slashes. The rest of the policy name will be inferred.
|
additionalData |
string
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 enrollmentTokenData field of the Device resource. The data must be 1024 characters or less; otherwise, the creation request will fail.
|
qrCode |
string
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 java.util.Properties representation of the properties in the JSON.
|
oneTimeOnly |
boolean
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 (deprecated) |
object (User )
This field is deprecated and the value is ignored.
|
allowPersonalUsage |
enum (AllowPersonalUsage )
Controls whether personal usage is allowed on a device provisioned with this enrollment token. For company-owned devices:
- Enabling personal usage allows the user to set up a work profile on the device.
- Disabling personal usage requires the user provision the device as a fully managed device.
For personally-owned devices:
- Enabling personal usage allows the user to set up a work profile on the device.
- Disabling personal usage will prevent the device from provisioning. Personal usage cannot be disabled on personally-owned device.
|
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. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-19 UTC.
[null,null,["Last updated 2025-02-19 UTC."],[[["Enrollment tokens authorize devices to enroll and are valid for a specified duration."],["They can be configured with policies, additional data, and single-use restrictions."],["Enrollment tokens can be created, deleted, retrieved, and listed via API methods."],["Devices can be enrolled using the token value or a generated QR code."],["Personal usage can be controlled for devices provisioned with an enrollment token."]]],["Enrollment tokens, used to authorize device enrollment, have properties like `name`, `value`, `duration`, and `expirationTimestamp`. The `policyName` determines the initial policy, and `additionalData` stores arbitrary information. Tokens can be one-time use (`oneTimeOnly`) and have a `qrCode` for device enrollment. The `allowPersonalUsage` setting controls personal device usage. Available actions include creating, deleting, getting, and listing these tokens via associated methods. The `user` field is deprecated.\n"]]