Azure IoT Central uses an IoT Hub in the background, so you can still connect to the public device endpoints using the MQTT protocol on port 8883.
To get the address of the hub you can use the script below on any machine based on the device information in the Azure IoT Central app (see the docs)
// npm install azure-iot-device azure-iot-device-mqtt azure-iot-provisioning-device-mqtt azure-iot-security-symmetric-key --save
"use strict";
// Use the Azure IoT device SDK for devices that connect to Azure IoT Central.
var iotHubTransport = require('azure-iot-device-mqtt').Mqtt;
var Client = require('azure-iot-device').Client;
var Message = require('azure-iot-device').Message;
var ProvisioningTransport = require('azure-iot-provisioning-device-mqtt').Mqtt;
var SymmetricKeySecurityClient = require('azure-iot-security-symmetric-key').SymmetricKeySecurityClient;
var ProvisioningDeviceClient = require('azure-iot-provisioning-device').ProvisioningDeviceClient;
var provisioningHost = 'global.azure-devices-provisioning.net';
var idScope = '{your Scope ID}';
var registrationId = '{your Device ID}';
var symmetricKey = ''{your Primary Key}';
var provisioningSecurityClient = new SymmetricKeySecurityClient(registrationId, symmetricKey);
var provisioningClient = ProvisioningDeviceClient.create(provisioningHost, idScope, new ProvisioningTransport(), provisioningSecurityClient);
provisioningClient.register((err, result) => {
if (err) {
console.log('Error registering device: ' + err);
} else {
console.log('Registration succeeded');
console.log('Assigned hub=' + result.assignedHub);
console.log('DeviceId=' + result.deviceId);
var connectionString = 'HostName=' + result.assignedHub + ';DeviceId=' + result.deviceId + ';SharedAccessKey=' + symmetricKey;
console.log(connectionString);
}
});
Output:
Registration succeeded
Assigned hub=iotc-xxx.azure-devices.net
DeviceId=xxx
HostName=xxx.azure-devices.net;DeviceId=xxx;SharedAccessKey=xxx=
In addition, as stated by Matthijs van der Veer, do note that IoT Central uses the Device Provisioning Service to enable your device to connect to an IoT hub. It assigns an IoT hub to the device when registering but if the device gets reassigned to a different hub, the device will lose connection.