Script set PIN using %CustomAttr%

Solved Locked

Hi, 

it's possible to obtain data from custom attributes and send a script to device?

like this:

On SOTI server have set this custom attributes on each device set manual her own PIN code and by script send:

resetpassword %CustomAttr:PIN% -bypass_secure_startup

but dosn't work, is blocked by default or custom attributes is used for other pourposes?

If I send this script

showmessagebox %SERIALNUM%   It works and show me this macro, but don't work with custom attributes  
Edited 4 years ago
Android
ANSWERS
RC
Raymond Chan Diamond Contributor
4 years ago

Hi Miquel,

Have you configured your 'PIN" custom attribute value to be propagated to targeted devices in the custom attribute manager of your MobiControl web console?

Solution
J
JSMOD@SOTI
4 years ago

Hi Miquel,

Thank you for posting on SOTI Central.

Could you please share some information about the device such as Manufacturer, Model, OS version and method of enrollment (i.e Android Classic or Android Enterprise)?

Many thanks,

MA
Miquel Angel Aloy Vich
4 years ago (edited 4 years ago)

Hi thanks for your answer,

My device:

  • Datalogic
  • MEMOR 10
  • Android 8.1.0
  • Android Enterprise

On Global Settings > Device Settings > PIN > Send To Device ON

I need some settings more?

MA
Miquel Angel Aloy Vich
4 years ago (edited 4 years ago)

Hi again,

today I've rebooted all my memor 10 and check-In again and works perfect. I don't know what's happen yesterday :(

 PIN -> 1234

script:

showmessagebox %CustomAttr:PIN%

And in my device appears 1234

 

Tested with resetpassword and works fine :)

resetpassword %CustomAttr:PIN%- bypass_secure_startup 

RC
Raymond Chan Diamond Contributor
4 years ago

After turning on the propagate (i.e. the "send to device" in newer UI as shown in your screenshot), it takes some time for the MobiControl server to schedule getting the custom attribute key pair sent to each of the targeted device in the next server-device update/sync.   If you don't want to wait, you should be able to make this happen almost instantly by initiating a "device check-in" action. A device reboot can of course get the same result.