Auto naming of devices - issues with %autonum%

S

Hallo,

we are having issues with automatically naming our devices.
Atm, we enroll devices and rename them manually.

This is an issue since it needs time, prone to human errors and our automatisms for device certificates > So i want to automate.

Idea was simple:

  • Android: A-%AUTONUM:4%
  • IOS: I-%AUTONUM:4%

Problem:
%Autonum% Counter is not global on the server.
Each Enrollment profile has its own counter.

So the numbering is as following:
- Android: %Autonum% at ~10 atm
- iOS: %Autonum% at ~75 atm
- Rename via GUI ~140 atm

Issue:
- There is a danger of duplicate naming when the enrollment counter reaches the counter of the existing devices.

SOTI Support says:
Can't do anything about that

Any ideas for a naming concept which is easily readable by user (Shown on lockdown template) and automateable?

16 days ago
SOTI MobiControl
ANSWERS
RS
Rafael Schäfer Platinum Contributor
16 days ago (edited 16 days ago)

This very depends on your entire use case.

I mean using the OS in the naming is somehow useless in my opinion (the user should know if he/she uses Android or Apple).

But more interesting, if exists, would be location like a store or department and environment like productive or test and whatever. And finally merging all of that together. But it's hard to tell as we don't know any background from your side.

And the question should be: Which naming convention do you need and then think about how you we acchive it.

An example from our side: We have several environments and stores and there several devices so we have 3 things, the user (most likely done by our hardware team) must enter: the Environment, the Store and the device which is written into an ini file collected by Soti agent (via html/JS lockdown) and used for relocating and naming (by script) and several other stuff.
We don't "use" the initial naming in production, except in the staging folder before this procedure comes in place.

But again, i donit know your background and so on, so it's nearly impossible to recommmend a specific naming.

 

S
Simon
16 days ago (edited 16 days ago)

To be honest - i dont care about a specific terminology like adding departments etc. (Too many changes in a fast growing company) so i keep it generic and add further info with custom fields or our inventory.

Naming should be consistent and automateable.

The integration of the OS in the naming may sound ueseless,
but when we ask the user for the device name during a call we automatically know the OS without asking/looking.

In the past we used:
Site[3]-Type[3]-Number[3], for example: FEN-TAB-001

Since it is not possible to automatically achieve that without creating loads of enrollment profiles i wanted to move to something easier. Service guys in our sites often create duplicate names because they fail to filter all devices in the dashboard and choose a unique name after enrollment .

Thats why i want to automate and name the device as soon as it is enrolled.
Devices are 95% generic or shared and not bound to any user.

RS
Rafael Schäfer Platinum Contributor
16 days ago

It's not true that you need loads of enrollment profiles.

You can acchive this like we do, the only change is in enrollment process, as they need to go through a "configurator" screen before device can be used. Let me tell it in a bit more detail (at least for Android, not sure about iOS to be honest!):

  1. All (Android) devices target the same enrollment rule ending up in same "staging" folder (however you want to call it).
  2. A kiosk screen (lockdown profile) applies on the screen where the user (no matter if it's enduser or your service guys) needs to enter 3 things:
    1. Site - can be free textfield, maybe with RegEx or even drop down if possible
    2. Type - can be free textfield, maybe with RegEx or even drop down if possible
    3. Number - can be free textfield, maybe with RegEx or even drop down if possible
  3. When someone presses then the "Save" button, it will be written into an ini file (or xml if you prefer) which can be grabbed by the Soti agent
  4. Optional: You put in place a relocation rule to relocate the device to the correct "Site"-Group
  5. If the data is entered or device relocated, you use a script to change the naming (by task profile).

Except the one time manual entering, fully automated with only one enrollment rule for each OS. But as said, not sure if for iOS similar is possible, we just created it for Android.

S
Simon
16 days ago

Hello Rafael,

thank you very much for the detailed explanaition - i was not aware of that possibility.

RS
Robert Schäfer
15 days ago

You can extend what Rafael has suggested even further and make it fully automated without having to enter anything manually. You mentioned your naming convention is generic.

Since SOTI has a full suite of REST API's, you could:

  1. On enrolment trigger a webhook using signal policies.
  2. Your endpoint then makes an api request to retrieve all device names of all devices in the system. Easy enough to limit this if you have some sort of structure to your naming convention.
  3. Identifies a unique name/value/ID
  4. Renames the device via api

You can even trigger API requests from the lockdown template itself. Rafael's idea works well, we have used that method too but if you use an API request to trigger the device rename + move to the right group (based on a site selection dropdown pulling in mobicontrol device groups) its far quicker. The custom data method requires the device to check in and this can in some cases take longer. As mentioned though, we use this method as well and it works fine in many cases. (but the API method is cooler ;) and more flexible)

The step by step method described above also works for iOS, while the lockdown method with custom data does not and scripts can't rename iOS devices either.

RC
Raymond Chan Diamond Contributor
15 days ago (edited 15 days ago)

Hi Simon,

Please note the following regarding device naming:

1. Use of %AUTONUM% or %AUTONUM:#% may result in devices with some number gap(s), which can happen whenever a device enrollment attempt fails due to termination of enrollment process due to various device end-user actions (such as turning off/rebooting the device to restart the enrollment process) or other device-side errors during enrollment   The next number used will be based on the enrollment "attempt" (whether successful or failed) count, rather than  the largest number found on the server with the target naming pattern.  Hence, some post-processing, whether manual or automatic, are needed once a number gap has been created.

2. Avoid special characters in the device name to reduce the chance of processing error by different kind of scripts or API in future automation processes.  In the past, there has been some particular MobiControl releases failing some operations due to use of some not too special character in the device name.   Hence, to be on the safe/conservative side,  I personally recommend ONLY using underscore and alphanumeric characters, and not even the space character, for my customers and my own projects.

3. Smart SYSTEMATIC naming of devices (e.g. with various standardized abbreviation sub-parts separated with understore) can be a good way for smart selection of devices in viewing in web-console or in policy assignment filters.  How many sub-parts to use and their order depends on your company workflow, organization-structure, locations, device modes, etc.  Unless the naming scheme is very simple and stable for a very long time, the use of script or other automation process (such as prompts to user to input some fields) may not be easy and reliable at the same time.  Thus,  MANUAL renaming/checking by MDM administrator is usually inevitable.  I would suggest having very simple INITIAL naming scheme (with simple name easily identifiable as not manually renamed yet, and can involve using %AUTONUM:#% with possible number gaps).  From time to time, administrator can use known keyword as filter pattern to identify devices to be manually renamed with the CORRECT full device name conforming to the naming scheme.  

 

S
Simon
6 days ago (edited 6 days ago)

Hello,

i will try to set up the WebHook and API calls.
Since i am a network engineer with limited knowledge in that area this will take some time i think.

I will document the results when i am done here.

Howewer, i personally find it strange that device names are not unique and %autonum% is not global or at least configurable.