CmdID / az / az iot / az iot hub / az iot hub identity
az iot hub identity assign
Assign managed identities to an IoT Hub Azure CLI reference
2 options Its page in the Azure CLI reference
Options
--system-assigned, --systemAssign a system-assigned managed identity to this hub.--user-assigned, --userAssign user-assigned managed identities to this hub.