Iot Dps Resource - List Keys
Get the security metadata for a provisioning service.
List the primary and secondary keys for a provisioning service.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/listkeys?api-version=2022-12-12
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
provisioning
|
path | True |
string |
The provisioning service name to get the shared access keys for. |
|
resource
|
path | True |
string |
resource group name |
|
subscription
|
path | True |
string |
The subscription identifier. |
|
api-version
|
query | True |
string |
The version of the API. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
This is a synchronous operation. The body contains a JSON-serialized array of shared access policies, including keys, that you can use to access the provisioning service endpoints. |
|
| Other Status Codes |
Default error response. |
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
DPSListKeys
Sample request
POST https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/provisioningServices/myFirstProvisioningService/listkeys?api-version=2022-12-12
Sample response
{
"value": [
{
"keyName": "key1",
"primaryKey": "#####################################",
"secondaryKey": "###################################",
"rights": "ServiceConfig"
},
{
"keyName": "key2",
"primaryKey": "#######################################",
"secondaryKey": "####################################=",
"rights": "ServiceConfig"
}
]
}
Definitions
| Name | Description |
|---|---|
|
Access |
Rights that this key has. |
|
Error |
Error details. |
|
Shared |
Description of the shared access key. |
|
Shared |
List of shared access keys. |
AccessRightsDescription
Rights that this key has.
| Value | Description |
|---|---|
| ServiceConfig | |
| EnrollmentRead | |
| EnrollmentWrite | |
| DeviceConnect | |
| RegistrationStatusRead | |
| RegistrationStatusWrite |
ErrorDetails
Error details.
| Name | Type | Description |
|---|---|---|
| code |
integer (int32) |
The error code. |
| details |
string |
The error details. |
| httpStatusCode |
string |
The HTTP status code. |
| message |
string |
The error message. |
SharedAccessSignatureAuthorizationRule[AccessRightsDescription]
Description of the shared access key.
| Name | Type | Description |
|---|---|---|
| keyName |
string |
Name of the key. |
| primaryKey |
string |
Primary SAS key value. |
| rights |
Rights that this key has. |
|
| secondaryKey |
string |
Secondary SAS key value. |
SharedAccessSignatureAuthorizationRuleListResult
List of shared access keys.
| Name | Type | Description |
|---|---|---|
| nextLink |
string |
The next link. |
| value |
Shared |
The list of shared access policies. |