Platform API gateway - Destructive device actions permission
The Platform API now separates destructive device actions from routine ones. Actions that cause irreversible data loss, or that lock owners out of their own devices, require the destructive-device-actions:execute permission. Routine actions still use device-actions:execute.
We made this change for security. With two separate permissions, you can give an integration everyday device management without also letting it erase or lock devices. If a credential is leaked or a script goes wrong, the damage is limited to what that client is allowed to do. We recommend you only grant destructive-device-actions:execute to clients that need it.
POST /v2/mdm/commands
POST /v2/mdm/commands is now available through the Platform API. The permission each request needs depends on its commandType:
| Permission | commandType values |
|---|---|
destructive-device-actions:execute | ERASE_DEVICE, DEVICE_LOCK, DELETE_USER |
local-admin-passwords:execute | SET_AUTO_ADMIN_PASSWORD |
recovery-lock:execute | SET_RECOVERY_LOCK |
device-actions:execute | The 30 routine commands listed below |
Commands covered by device-actions:execute:
- Device information:
DEVICE_INFORMATION,DEVICE_LOCATION,SECURITY_INFO,CERTIFICATE_LIST,PROFILE_LIST,PROVISIONING_PROFILE_LIST,INSTALLED_APPLICATION_LIST,MANAGED_APPLICATION_LIST,MANAGED_MEDIA_LIST,VERIFY_RECOVERY_LOCK - Lost Mode:
ENABLE_LOST_MODE,DISABLE_LOST_MODE,PLAY_LOST_MODE_SOUND - Power and user sessions:
RESTART_DEVICE,SHUT_DOWN_DEVICE,LOG_OUT_USER,UNLOCK_USER_ACCOUNT - Passcodes:
CLEAR_PASSCODE,CLEAR_RESTRICTIONS_PASSWORD - Remote desktop and mirroring:
ENABLE_REMOTE_DESKTOP,DISABLE_REMOTE_DESKTOP,REQUEST_MIRRORING,STOP_MIRRORING - Settings, apps and declarative management:
SETTINGS,DECLARATIVE_MANAGEMENT,APPLY_REDEMPTION_CODE,VALIDATE_APPLICATIONS,REFRESH_CELLULAR_PLANS - Diagnostics:
TRIGGER_ENHANCED_LOG_COLLECTION,CANCEL_ENHANCED_LOG_COLLECTION
The request is rejected if the commandType isn't one of the values above.
Destructive actions on the other device endpoints, such as erase, unmanage and delete, also require destructive-device-actions:execute. For the full list, see the permissions map.