Create enrollment tokens for multiple users
Required Permission: mdm.windows.enrollmentToken.create
Generate enrollment credentials for multiple users simultaneously, distributing personalized enrollment links and instructions to each specified email address with shared policy settings.
Request
authorization
Authorization: Bearer <token>
application/json
{
"type": "object",
"children": {
"sendEmail": {
"type": "boolean",
"flags": {
"insensitive": true,
"presence": "required"
},
"truthy": true,
"falsy": true
},
"displayName": {
"type": "string",
"valids": "",
"rules": {
"name": "max",
"arg": 128
}
},
"tags": {
"type": "array",
"flags": {
"sparse": true
},
"items": {
"type": "string",
"valids": "",
"rules": {
"name": "max",
"arg": 128
}
}
},
"duration": {
"type": "number",
"flags": {
"unsafe": true
},
"invalids": null,
"rules": {
"name": "integer"
}
},
"language": {
"type": "string",
"flags": {
"allowOnly": true
},
"valids": "es",
"invalids": ""
},
"emailText": {
"type": "string",
"valids": ""
},
"winPolicyId": {
"type": "string",
"valids": "",
"rules": {
"name": "regex",
"arg": {
"pattern": "string"
}
}
},
"winPolicyAssignments": {
"type": "array",
"flags": {
"sparse": true
},
"items": {
"type": "object",
"children": {
"winPolicyId": {
"type": "string",
"invalids": "",
"rules": {
"name": "regex",
"arg": {
"pattern": "string"
}
}
},
"priority": {
"type": "number",
"flags": {
"unsafe": true,
"presence": "required"
},
"invalids": null,
"rules": {
"name": "integer"
}
}
}
}
},
"segmentId": {
"type": "number",
"flags": {
"unsafe": true
},
"invalids": null,
"rules": {
"name": "integer"
}
}
},
"userEmails": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}
Responses
application/json
{
"status": true,
"data": {
"total": 10,
"success": 9,
"fail": 1
}
}
application/json
{
"status": false,
"error": {
"code": 5050,
"message": "Feature not allowed for you billing plan"
}
}
application/json
{
"status": false,
"error": {
"code": 4002,
"message": "No auth token"
}
}
application/json
{
"status": false,
"error": {
"code": 3001,
"message": "Entity not found"
}
}