Setting Device Names

By Katelyn Husvar

Learn how to use a Library Item or MDM command to set device names

What is the Device Name Library Item?

The Device Name Library Item is designed to help IT administrators apply consistent naming conventions across Apple devices. It provides flexibility and comprehensive control over device naming, making managing devices easier. 

Administrators can create standardized naming patterns using customizable formulas. These formulas can include variables such as asset tags, user names, blueprint names, company names, serial numbers, and custom text, allowing for a tailored approach to device naming. The Device Name Library Item also manages device hostnames by replacing spaces with hyphens, ensuring compatibility with systems that rely on hostnames, like network security appliances.

This Library Item requires supervision.

Add a Device Name Library Item

  1. Click Add New on the top-right, and choose Device Name.
  2. Click Add & Configure.
  3. Give the new Device Name Library Item a name
  4. Assign to your desired Assignment Maps or Classic Blueprints. 

Configure the Device Name Library Item

Device Name

  1. Drag variables in the Device name pattern field to define your desired pattern. Be mindful of platform-specific differences; for example, "Primary local user name" is not available on iOS and iPadOS.
  2. Review the resulting pattern preview.

Hostname

By default, the Device Name Library Item will use the same pattern for the device name and hostname. Optionally, you can configure the Device Name Library Item to have separate device name and hostname patterns on Mac computers (allowing the device name to be more user-friendly).

  1. Select Customize hostname.
  2. Drag variables into the hostname pattern field to define your desired pattern. Be mindful of platform-specific differences; for example, "Primary local user name" is unavailable on iOS and iPadOS.
  3. Review the resulting pattern preview.

Hostname Considerations

  • If you deselected Mac in the device families, the Hostname section will be disabled as MDM can only manage hostname on Mac. iOS, iPadOS and tvOS set their hostname automatically based on the Device Name.
  • iOS and iPadOS devices connect to Wi-Fi networks with Private Wi-Fi Address turned on by default. With this setting turned on, the device does not share the hostname with the network. Instead, it shares the device's Model Name, e.g., iPad Pro 11 (4th Gen). You can turn this setting off using the Disable MAC address randomization configuration option in the Wi-Fi Library Item.

Device name modification

  1. Optionally, to prevent users from modifying the device name or hostname, select the Prevent users from modifying device name and hostname checkbox.
  2. Click the Save button to save the Device Name Library Item to your Library.
  • On iOS, iPadOS, tvOS and macOS 14 Sonoma and later, this will set the Supervised restriction preventing users from modifying their device's name. On macOS versions prior to macOS 14 Sonoma, the Kandji Agent will remediate device name and hostname changes after the next Agent check-in.

Manually rename a device

macOS, iOS, iPadOS, and tvOS device names can be set directly on the associated device record page. This action will be unavailable if you have a Device Name Library Item set to configure the device's name.

This Device Action requires supervision.
  1. Navigate to a device record.
  2. Click the Device Action menu in the upper right corner.
  3. Click Set device name from the action menu.
  4. Enter a device name into the Set Device Name window.
  5. Click Set Device Name.