Create provisioning QR code
create_provisioning_qr_codeCreate a QR code that enrolls a new or factory-reset Android device into this company under the given policy. Each call creates a new enrollment token that stops working 24 hours later, so create one only when the user asks for a QR code to enroll devices, and never reuse an older one. The QR image is delivered to the user directly with this result: do not describe, transcribe or rebuild it. To use it, tap the welcome screen of the device's setup wizard six times and scan the code. VR-only policies cannot be provisioned with a QR code. A personal (BYOD) device that is already set up needs no QR code and no reset: it gets a work profile from the policy's Personal enrollment link and token in the portal (New device > Personal).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"policyId": "<policyId>"
},
"name": "create_provisioning_qr_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| company | No | Optional: a `company` value from list_companies to run this in. Omit it for the connection's own company. | |
| policyId | Yes | Path name of the policy the device enrolls with - the "pathName" returned by list_policies. | |
| wifiSsid | No | Optional Wi-Fi network the device joins during setup. Only when the user asks for it. | |
| wifiHidden | No | Whether wifiSsid is a hidden network. Defaults to false. | |
| wifiPassword | No | Password of wifiSsid. Only a password the user gave in this conversation; never guess it. | |
| wifiSecurity | No | Security of wifiSsid. Defaults to WPA when a password is given, NONE otherwise. | |
| personalUsage | No | Company-owned device with a work profile that keeps the user's personal data separate (ALLOWED, also called COPE), company-owned fully managed device (DISALLOWED), or dedicated device without a user account (USERLESS). Omit for the default (UNSPECIFIED). Every value enrolls a new or factory-reset company device: a personal (BYOD) device does not enroll with a QR code. |