This version of Unity is unsupported.

InputDevice.role

public XR.InputDeviceRole role;

Description

Read Only. The InputDeviceRole of the device in the XR system. This is a platform provided description of how the device is used.