You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-central/core/howto-manage-devices-with-rest-api.md
+31-32Lines changed: 31 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,6 @@ ms.date: 06/22/2022
7
7
ms.topic: how-to
8
8
ms.service: iot-central
9
9
services: iot-central
10
-
zone_pivot_groups: enrollment-group
11
10
12
11
---
13
12
@@ -550,17 +549,19 @@ The response to this request looks like the following example:
550
549
551
550
## Enrollment groups
552
551
553
-
Enrollment groups are used to manage the device authentication options in your IoT Central application. To learn more, see [Device authentication concepts in IoT Central](concepts-device-authentication.md)
552
+
Enrollment groups are used to manage the device authentication options in your IoT Central application. To learn more, see [Device authentication concepts in IoT Central](concepts-device-authentication.md).
554
553
555
554
To learn how to create and manage enrollment groups in the UI, see [How to connect devices with X.509 certificates to IoT Central Application](how-to-connect-devices-x509.md).
556
555
557
-
## Add enrollment groups
556
+
## Create an enrollment group
558
557
559
-
:::zone pivot="enrollment-group-x509"
558
+
### [X.509](#tab/X.509)
559
+
560
+
When you create an enrollment group for devices that use X.509 certificates, you first need to upload the root or intermediate certificate to your IoT Central application.
560
561
561
562
### Generate root and device certificates
562
563
563
-
In this section, you use an X.509 certificate to connect a device with a certificate derived from the IoT Central enrollment group's certificate.
564
+
In this section, you generate the X.509 certificates you need to connect a device to IoT Central.
564
565
565
566
> [!WARNING]
566
567
> This way of generating X.509 certs is for testing only. For a production environment you should use your official, secure mechanism for certificate generation.
@@ -586,14 +587,14 @@ These commands produce the following root and the device certificate
586
587
587
588
| filename | contents |
588
589
| -------- | -------- |
589
-
| mytestrootcert_cert.pem | The public portion of the root X509 certificate |
590
-
| mytestrootcert_key.pem | The private key for the root X509 certificate |
591
-
| mytestrootcert_fullchain.pem | The entire keychain for the root X509 certificate. |
592
-
| mytestrootcert.pfx | The PFX file for the root X509 certificate. |
593
-
| sampleDevice01_cert.pem | The public portion of the device X509 certificate |
594
-
| sampleDevice01_key.pem | The private key for the device X509 certificate |
595
-
| sampleDevice01_fullchain.pem | The entire keychain for the device X509 certificate. |
596
-
| sampleDevice01.pfx | The PFX file for the device X509 certificate. |
590
+
| mytestrootcert_cert.pem | The public portion of the root X.509 certificate |
591
+
| mytestrootcert_key.pem | The private key for the root X.509 certificate |
592
+
| mytestrootcert_fullchain.pem | The entire keychain for the root X.509 certificate. |
593
+
| mytestrootcert.pfx | The PFX file for the root X.509 certificate. |
594
+
| sampleDevice01_cert.pem | The public portion of the device X.509 certificate |
595
+
| sampleDevice01_key.pem | The private key for the device X.509 certificate |
596
+
| sampleDevice01_fullchain.pem | The entire keychain for the device X.509 certificate. |
597
+
| sampleDevice01.pfx | The PFX file for the device X.509 certificate. |
597
598
598
599
Make a note of the location of these files. You need it later.
599
600
@@ -662,7 +663,7 @@ The response to this request looks like the following example:
662
663
}
663
664
```
664
665
665
-
### Add a X.509 certificate to an enrollment group
666
+
### Add an X.509 certificate to an enrollment group
666
667
667
668
Use the following request to set the primary X.509 certificate of the myx509eg enrollment group:
668
669
@@ -674,7 +675,7 @@ PUT https://{your app subdomain}.azureiotcentral.com/api/enrollmentGroups/myx509
674
675
675
676
Use this request to add either a primary or secondary X.509 certificate to the enrollment group.
676
677
677
-
The following example shows a request body that adds a X.509 certificate to an enrollment group:
678
+
The following example shows a request body that adds an X.509 certificate to an enrollment group:
678
679
679
680
```json
680
681
{
@@ -700,7 +701,7 @@ The response to this request looks like the following example:
700
701
701
702
### Generate verification code for an X.509 certificate
702
703
703
-
Use the following request to generate a verification code for the primary or secondary X509 certificate of an enrollment group.
704
+
Use the following request to generate a verification code for the primary or secondary X.509 certificate of an enrollment group.
704
705
705
706
If you set `verified` to `false` in the previous request, use the following request to generate a verification code for the primary X.509 certificate in the `myx509eg` enrollment group:
706
707
@@ -739,10 +740,10 @@ Make a note of the base-64 encoded version of the certifcate. You need it later.
739
740
Use the following request to verify the primary X.509 certificate of the `myx509eg` enrollment group by providing the certificate with the signed verification code:
740
741
741
742
```http
742
-
POST https://{subdomain}.{baseDomain}/api/enrollmentGroups/{enrollmentGroupId}/certificates/{entry}/verify?api-version=2022-07-31
743
+
POST PUT https://{your app subdomain}.azureiotcentral.com/api/enrollmentGroups/myx509eg/certificates/primary/verify?api-version=2022-07-31
743
744
```
744
745
745
-
The following example shows a request body that verifys a X509 certificate:
746
+
The following example shows a request body that verifies an X.509 certificate:
746
747
747
748
```json
748
749
{
@@ -752,10 +753,10 @@ The following example shows a request body that verifys a X509 certificate:
752
753
753
754
### Get X.509 certificate of an enrollment group
754
755
755
-
Use the following request to retrieve details of X509 certificate of an enrollment group from your application:
756
+
Use the following request to retrieve details of X.509 certificate of an enrollment group from your application:
756
757
757
758
```http
758
-
GET https://{subdomain}.{baseDomain}/api/enrollmentGroups/{enrollmentGroupId}/certificates/{entry}?api-version=2022-07-31
759
+
GET https://{your app subdomain}/api/enrollmentGroups/myx509eg/certificates/primary?api-version=2022-07-31
759
760
```
760
761
761
762
The response to this request looks like the following example:
@@ -770,17 +771,15 @@ The response to this request looks like the following example:
770
771
}
771
772
```
772
773
773
-
### Delete a X.509 certificate from an enrollment group
774
+
### Delete an X.509 certificate from an enrollment group
774
775
775
776
Use the following request to delete the primary X.509 certificate from an enrollment group with ID `myx509eg`:
0 commit comments