If you want to ensure that the licensing process cannot be canceled by the user, proceed as follows:
Create a UMS profile in which Setup > System > Remote management > Prompt user on UMS actions is deactivated. The profile must be based on exactly the same firmware version that is installed on the devices.