If my post was useful accept solution and/or give kudos.
Any opinions expressed here are solely my own and not necessarily that of HPE or Aruba.
Original Message:
Sent: Apr 07, 2026 06:44 AM
From: GorazdKikelj
Subject: ClearPass converting endpoint data to Guest Device Import format
ClearPass has this nice feature to having all detected/discovered endpoints stored in it's database. The sad thing is, that you can't export data from endpoint db into [Guest Device Repository]. Exported XML format do not match required import XML format. This would be a useful feature in Endpoint export function.
Here I offer three options how to do this conversion.
The easiest is to use SQL statement and read endpoint db directly.
COPY (
SELECT
upper(substring(mac_address, 1,2) || '-' ||
substring(mac_address, 3,2) || '-' ||
substring(mac_address, 5,2) || '-' ||
substring(mac_address, 7,2) || '-' ||
substring(mac_address, 9,2) || '-' ||
substring(mac_address, 11,2)) as mac,
CASE WHEN (hostname IS NOT NULL AND hostname != '') THEN hostname ELSE mac_address END AS visitor_name,
CASE
WHEN lower(device_category) = 'monitoring devices' THEN 'iot'
WHEN lower(device_category) = 'camera' THEN 'security'
ELSE device_category
END AS role_id,
1 as mac_auth,
0 as do_expire
FROM public.tips_endpoints_view
WHERE device_category LIKE 'Printer'
) TO stdout
WITH CSV HEADER;
conv_endpoint_to_guest.py expect Endpoint XML export file as input and return XML formatted for Guest Devices import.
cp_get_endpoint.py use REST API to gather endpoints from ClearPass and return CSV file for import into Guest Devices.
Hopefully it will be useful for somebody.
Best, Gorazd
------------------------------
Gorazd Kikelj
MVP Guru 2025
------------------------------