Runtime Registration - Register Device
Registers the devices.
PUT https://global.azure-devices-provisioning.net/{idScope}/registrations/{registrationId}/register?api-version=2021-10-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
id
|
path | True |
string |
The scope of the DPS instance. |
|
registration
|
path | True |
string |
The registration ID is alphanumeric, lowercase, and may contain hyphens. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Type | Description |
|---|---|---|
| payload |
|
Any object |
| registrationId |
string |
The registration ID is a case-insensitive string (up to 128 characters long) of alphanumeric characters plus certain special characters : . _ -. No special characters allowed at start or end. |
| tpm |
Attestation via TPM. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The request has succeeded. |
|
| 202 Accepted |
The request has been accepted for processing, but processing has not yet completed. Headers
|
|
| Other Status Codes |
An unexpected error response. Headers x-ms-error-code: string |
Examples
|
Runtime |
|
Runtime |
RuntimeRegistration_RegisterDevice_MaximumSet_Gen
Sample request
PUT https://global.azure-devices-provisioning.net/ofvgihmgllfsmm/registrations/macgmlbhpb/register?api-version=2021-10-01
{
"payload": {},
"registrationId": "qypnuerjeunzogqdezhjgisfr",
"tpm": {
"endorsementKey": "sbvvzftylrpsetexcmnijtdezppq",
"storageRootKey": "juohyrayid"
}
}
Sample response
{
"operationId": "xosjboksmobnotwgqejpvxiwi",
"registrationState": {
"assignedHub": "ljexps",
"createdDateTimeUtc": "2025-10-01T17:41:56.535Z",
"deviceId": "hjvdlwpugzlk",
"errorCode": 13,
"errorMessage": "zpctqazbkbiqjkwosis",
"etag": "hjtelksspyfzhmet",
"lastUpdatedDateTimeUtc": "2025-10-01T17:41:56.535Z",
"payload": {},
"registrationId": "urejrffpkqneou",
"status": "unassigned",
"substatus": "initialAssignment",
"symmetricKey": {
"enrollmentGroupId": "w"
},
"tpm": {
"authenticationKey": "sofbxakhjrxpiyysjjxkx"
},
"x509": {
"certificateInfo": {
"issuerName": "pvpbipnhcahytrcq",
"notAfterUtc": "2025-10-01T17:41:56.534Z",
"notBeforeUtc": "2025-10-01T17:41:56.534Z",
"serialNumber": "jjvdijgwgpagrjdi",
"sha1Thumbprint": "guqltcfgusf",
"sha256Thumbprint": "ysryarleygpkejrjlwuxacvcwbxqw",
"subjectName": "jtsfqnbcmmott",
"version": 20
},
"enrollmentGroupId": "qbw",
"signingCertificateInfo": {
"issuerName": "pvpbipnhcahytrcq",
"notAfterUtc": "2025-10-01T17:41:56.534Z",
"notBeforeUtc": "2025-10-01T17:41:56.534Z",
"serialNumber": "jjvdijgwgpagrjdi",
"sha1Thumbprint": "guqltcfgusf",
"sha256Thumbprint": "ysryarleygpkejrjlwuxacvcwbxqw",
"subjectName": "jtsfqnbcmmott",
"version": 20
}
}
},
"status": "unassigned"
}
{
"operationId": "xosjboksmobnotwgqejpvxiwi",
"registrationState": {
"assignedHub": "ljexps",
"createdDateTimeUtc": "2025-10-01T17:41:56.535Z",
"deviceId": "hjvdlwpugzlk",
"errorCode": 13,
"errorMessage": "zpctqazbkbiqjkwosis",
"etag": "hjtelksspyfzhmet",
"lastUpdatedDateTimeUtc": "2025-10-01T17:41:56.535Z",
"payload": {},
"registrationId": "urejrffpkqneou",
"status": "unassigned",
"substatus": "initialAssignment",
"symmetricKey": {
"enrollmentGroupId": "w"
},
"tpm": {
"authenticationKey": "sofbxakhjrxpiyysjjxkx"
},
"x509": {
"certificateInfo": {
"issuerName": "pvpbipnhcahytrcq",
"notAfterUtc": "2025-10-01T17:41:56.534Z",
"notBeforeUtc": "2025-10-01T17:41:56.534Z",
"serialNumber": "jjvdijgwgpagrjdi",
"sha1Thumbprint": "guqltcfgusf",
"sha256Thumbprint": "ysryarleygpkejrjlwuxacvcwbxqw",
"subjectName": "jtsfqnbcmmott",
"version": 20
},
"enrollmentGroupId": "qbw",
"signingCertificateInfo": {
"issuerName": "pvpbipnhcahytrcq",
"notAfterUtc": "2025-10-01T17:41:56.534Z",
"notBeforeUtc": "2025-10-01T17:41:56.534Z",
"serialNumber": "jjvdijgwgpagrjdi",
"sha1Thumbprint": "guqltcfgusf",
"sha256Thumbprint": "ysryarleygpkejrjlwuxacvcwbxqw",
"subjectName": "jtsfqnbcmmott",
"version": 20
}
}
},
"status": "unassigned"
}
RuntimeRegistration_RegisterDevice_MinimumSet_Gen
Sample request
PUT https://global.azure-devices-provisioning.net/gwgyqmyyzzzjpjmxml/registrations/tuodrxicixbbekaajxfiyvoxsbe/register?api-version=2021-10-01
{}
Sample response
{
"operationId": "xosjboksmobnotwgqejpvxiwi"
}
{
"operationId": "xosjboksmobnotwgqejpvxiwi"
}
Definitions
| Name | Description |
|---|---|
|
Assigned |
Substatus for 'Assigned' devices. Possible values include - 'initialAssignment': Device has been assigned to an IoT hub for the first time, 'deviceDataMigrated': Device has been assigned to a different IoT hub and its device data was migrated from the previously assigned IoT hub. Device data was removed from the previously assigned IoT hub, 'deviceDataReset': Device has been assigned to a different IoT hub and its device data was populated from the initial state stored in the enrollment. Device data was removed from the previously assigned IoT hub, 'reprovisionedToInitialAssignment': Device has been re-provisioned to a previously assigned IoT hub. |
|
Device |
Device registration. |
|
Device |
Device registration result. |
|
Enrollment |
Enrollment status. |
|
Provisioning |
Contains the properties of an error returned by the Azure IoT Hub Provisioning Service. |
|
Registration |
Registration operation status. |
|
Symmetric |
Registration result returned when using SymmetricKey attestation. |
|
Tpm |
Attestation via TPM. |
|
Tpm |
TPM registration result. |
|
X509Certificate |
X509 certificate info. |
|
X509Registration |
X509 registration result. |
AssignedDeviceSubstatus
Substatus for 'Assigned' devices. Possible values include - 'initialAssignment': Device has been assigned to an IoT hub for the first time, 'deviceDataMigrated': Device has been assigned to a different IoT hub and its device data was migrated from the previously assigned IoT hub. Device data was removed from the previously assigned IoT hub, 'deviceDataReset': Device has been assigned to a different IoT hub and its device data was populated from the initial state stored in the enrollment. Device data was removed from the previously assigned IoT hub, 'reprovisionedToInitialAssignment': Device has been re-provisioned to a previously assigned IoT hub.
| Value | Description |
|---|---|
| initialAssignment |
initialAssignment |
| deviceDataMigrated |
deviceDataMigrated |
| deviceDataReset |
deviceDataReset |
| reprovisionedToInitialAssignment |
reprovisionedToInitialAssignment |
DeviceRegistration
Device registration.
| Name | Type | Description |
|---|---|---|
| payload |
|
Any object |
| registrationId |
string |
The registration ID is a case-insensitive string (up to 128 characters long) of alphanumeric characters plus certain special characters : . _ -. No special characters allowed at start or end. |
| tpm |
Attestation via TPM. |
DeviceRegistrationResult
Device registration result.
| Name | Type | Description |
|---|---|---|
| assignedHub |
string |
Assigned Azure IoT Hub. |
| createdDateTimeUtc |
string (date-time) |
Registration create date time (in UTC). |
| deviceId |
string |
Device ID. |
| errorCode |
integer (int32) |
Error code. |
| errorMessage |
string |
Error message. |
| etag |
string |
The entity tag associated with the resource. |
| lastUpdatedDateTimeUtc |
string (date-time) |
Last updated date time (in UTC). |
| payload |
|
Any object |
| registrationId |
string |
This id is used to uniquely identify a device registration of an enrollment. A case-insensitive string (up to 128 characters long) of alphanumeric characters plus certain special characters : . _ -. No special characters allowed at start or end. |
| status |
Enrollment status. |
|
| substatus |
Substatus for 'Assigned' devices. Possible values include - 'initialAssignment': Device has been assigned to an IoT hub for the first time, 'deviceDataMigrated': Device has been assigned to a different IoT hub and its device data was migrated from the previously assigned IoT hub. Device data was removed from the previously assigned IoT hub, 'deviceDataReset': Device has been assigned to a different IoT hub and its device data was populated from the initial state stored in the enrollment. Device data was removed from the previously assigned IoT hub, 'reprovisionedToInitialAssignment': Device has been re-provisioned to a previously assigned IoT hub. |
|
| symmetricKey |
Registration result returned when using SymmetricKey attestation. |
|
| tpm |
TPM registration result. |
|
| x509 |
X509 registration result. |
EnrollmentStatus
Enrollment status.
| Value | Description |
|---|---|
| unassigned |
unassigned |
| assigning |
assigning |
| assigned |
assigned |
| failed |
failed |
| disabled |
disabled |
ProvisioningServiceErrorDetails
Contains the properties of an error returned by the Azure IoT Hub Provisioning Service.
| Name | Type | Description |
|---|---|---|
| errorCode |
integer (int32) |
Numeric error code. |
| info |
object |
Dictionary of <string> |
| message |
string |
Error message. |
| timestampUtc |
string (date-time) |
Error timestamp (UTC). |
| trackingId |
string |
Error tracking ID. |
RegistrationOperationStatus
Registration operation status.
| Name | Type | Description |
|---|---|---|
| operationId |
string minLength: 1 |
Operation ID. |
| registrationState |
Device registration result. |
|
| status |
Device enrollment status. |
SymmetricKeyRegistrationResult
Registration result returned when using SymmetricKey attestation.
| Name | Type | Description |
|---|---|---|
| enrollmentGroupId |
string |
Enrollment group ID. |
TpmAttestation
Attestation via TPM.
| Name | Type | Description |
|---|---|---|
| endorsementKey |
string |
TPM endorsement key. |
| storageRootKey |
string |
TPM storage root key. |
TpmRegistrationResult
TPM registration result.
| Name | Type | Description |
|---|---|---|
| authenticationKey |
string |
Encrypted authentication key. |
X509CertificateInfo
X509 certificate info.
| Name | Type | Description |
|---|---|---|
| issuerName |
string |
Certificate issuer name. |
| notAfterUtc |
string (date-time) |
Certificate expiry date (UTC). |
| notBeforeUtc |
string (date-time) |
Certificate validity start date (UTC). |
| serialNumber |
string |
Certificate serial number. |
| sha1Thumbprint |
string |
SHA-1 thumbprint of the certificate. |
| sha256Thumbprint |
string |
SHA-256 thumbprint of the certificate. |
| subjectName |
string |
Certificate subject name. |
| version |
integer (int32) |
Certificate version. |
X509RegistrationResult
X509 registration result.
| Name | Type | Description |
|---|---|---|
| certificateInfo |
X509 certificate info. |
|
| enrollmentGroupId |
string |
Enrollment group ID. |
| signingCertificateInfo |
X509 certificate info. |