Create
|
|||||
|
|
Creates an enrollment token for a given enterprise
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- Manage Android devices and apps for your customers
Input
This building block consumes 11 input parameters
Name | Format | Description |
---|---|---|
parent Required |
STRING |
The name of the enterprise in the form enterprises/{enterpriseId} |
name |
STRING |
The name of the enrollment token, which is generated by the server during creation, in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId} |
user |
OBJECT |
A user belonging to an enterprise |
user.accountIdentifier |
STRING |
A unique identifier you create for this user, such as user342 or asset#44418. This field must be set when the user is created and can't be updated. This field must not contain personally identifiable information (PII). This identifier must be 1024 characters or less; otherwise, the update policy request will fail |
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 |
ANY |
The length of time the enrollment token is valid, ranging from 1 minute to 30 days. If not specified, the default duration is 1 hour |
expirationTimestamp |
ANY |
The expiration time of the token. This is a read-only field generated by the server |
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 enrollment_token_data field of the Device resource. The data must be 1024 characters or less; otherwise, the creation request will fail |
policyName |
STRING |
The name of the policy initially applied to the enrolled device, in the form enterprises/{enterpriseId}/policies/{policyId}. If not specified, the policy_name for the device’s user is applied. If user_name 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 |
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 |
= Parameter name
= Format
parent STRING Required The name of the enterprise in the form enterprises/{enterpriseId} |
name STRING The name of the enrollment token, which is generated by the server during creation, in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId} |
user OBJECT A user belonging to an enterprise |
user.accountIdentifier STRING A unique identifier you create for this user, such as user342 or asset#44418. This field must be set when the user is created and can't be updated. This field must not contain personally identifiable information (PII). This identifier must be 1024 characters or less; otherwise, the update policy request will fail |
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 ANY The length of time the enrollment token is valid, ranging from 1 minute to 30 days. If not specified, the default duration is 1 hour |
expirationTimestamp ANY The expiration time of the token. This is a read-only field generated by the server |
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 enrollment_token_data field of the Device resource. The data must be 1024 characters or less; otherwise, the creation request will fail |
policyName STRING The name of the policy initially applied to the enrolled device, in the form enterprises/{enterpriseId}/policies/{policyId}. If not specified, the policy_name for the device’s user is applied. If user_name 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 |
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 |
Output
This building block provides 10 output parameters
Name | Format | Description |
---|---|---|
name |
STRING |
The name of the enrollment token, which is generated by the server during creation, in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId} |
user |
OBJECT |
A user belonging to an enterprise |
user.accountIdentifier |
STRING |
A unique identifier you create for this user, such as user342 or asset#44418. This field must be set when the user is created and can't be updated. This field must not contain personally identifiable information (PII). This identifier must be 1024 characters or less; otherwise, the update policy request will fail |
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 |
ANY |
The length of time the enrollment token is valid, ranging from 1 minute to 30 days. If not specified, the default duration is 1 hour |
expirationTimestamp |
ANY |
The expiration time of the token. This is a read-only field generated by the server |
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 enrollment_token_data field of the Device resource. The data must be 1024 characters or less; otherwise, the creation request will fail |
policyName |
STRING |
The name of the policy initially applied to the enrolled device, in the form enterprises/{enterpriseId}/policies/{policyId}. If not specified, the policy_name for the device’s user is applied. If user_name 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 |
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 |
= Parameter name
= Format
name STRING The name of the enrollment token, which is generated by the server during creation, in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId} |
user OBJECT A user belonging to an enterprise |
user.accountIdentifier STRING A unique identifier you create for this user, such as user342 or asset#44418. This field must be set when the user is created and can't be updated. This field must not contain personally identifiable information (PII). This identifier must be 1024 characters or less; otherwise, the update policy request will fail |
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 ANY The length of time the enrollment token is valid, ranging from 1 minute to 30 days. If not specified, the default duration is 1 hour |
expirationTimestamp ANY The expiration time of the token. This is a read-only field generated by the server |
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 enrollment_token_data field of the Device resource. The data must be 1024 characters or less; otherwise, the creation request will fail |
policyName STRING The name of the policy initially applied to the enrolled device, in the form enterprises/{enterpriseId}/policies/{policyId}. If not specified, the policy_name for the device’s user is applied. If user_name 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 |
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 |