Devices - Get Credentials
Get device credentials
GET https://{subdomain}.{baseDomain}/api/devices/{deviceId}/credentials?api-version=2022-07-31
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
base
|
path | True |
string |
The base domain for all Azure IoT Central service requests. |
device
|
path | True |
string |
Unique ID of the device. |
subdomain
|
path | True |
string |
The application subdomain. |
api-version
|
query | True |
string |
The version of the API being called. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
An error response received from the IoT Central Service. Headers x-ms-error-code: string |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Get device credentials
Sample Request
GET https://appsubdomain.azureiotcentral.com/api/devices/Checkout4/credentials?api-version=2022-07-31
Sample Response
{
"idScope": "<ID scope>",
"symmetricKey": {
"primaryKey": "<primary key>",
"secondaryKey": "<secondary key>"
}
}
Definitions
Name | Description |
---|---|
Device |
The device credentials definition. |
Error |
The response error definition. |
Error |
The detail information of the error. |
Symmetric |
The symmetric key definition. |
Tpm |
The trusted platform module definition. |
X509 |
The X509 definition. |
X509Certificate |
The X509 certificate definition. |
X509Certificate |
The X509 certificate info. |
X509Certificates |
The X509 certificates definition. |
DeviceCredentials
The device credentials definition.
Name | Type | Description |
---|---|---|
idScope |
string |
ID scope for connecting to the IoT Central application. |
symmetricKey |
The symmetric key credentials for the device. |
|
tpm |
The TPM credentials for the device. |
|
x509 |
The X.509 credential information for the device. |
Error
The response error definition.
Name | Type | Description |
---|---|---|
error |
Error details for current request. |
ErrorDetails
The detail information of the error.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message details. |
requestId |
string |
Correlation Id for current request. |
time |
string |
The time that error request failed. |
SymmetricKey
The symmetric key definition.
Name | Type | Description |
---|---|---|
primaryKey |
string |
The primary key for this credential. |
secondaryKey |
string |
The secondary key for this credential. |
Tpm
The trusted platform module definition.
Name | Type | Description |
---|---|---|
endorsementKey |
string |
The TPM endorsement key for this credential. |
X509
The X509 definition.
Name | Type | Description |
---|---|---|
clientCertificates |
The X.509 client certificates for this credential. |
X509Certificate
The X509 certificate definition.
Name | Type | Description |
---|---|---|
certificate |
string |
The string representation of this certificate. |
info |
Information about this certificate. |
X509CertificateInfo
The X509 certificate info.
Name | Type | Description |
---|---|---|
sha1Thumbprint |
string |
The SHA-1 hash value of the certificate. |
X509Certificates
The X509 certificates definition.
Name | Type | Description |
---|---|---|
primary |
The primary X.509 certificate for this credential. |
|
secondary |
The secondary X.509 certificate for this credential. |