Connected Cluster - List Cluster User Credential

Gets cluster user credentials of a connected cluster
Gets cluster user credentials of the connected cluster with a specified resource group and name.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential?api-version=2026-05-01

URI Parameters

Name In Required Type Description
clusterName
path True

string

The name of the Kubernetes cluster on which get is called.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Required Type Description
authenticationMethod True

AuthenticationMethod

The mode of client authentication.

clientProxy True

boolean

Boolean value to indicate whether the request is for client side proxy or not

Responses

Name Type Description
200 OK

CredentialResults

Azure operation completed successfully.

Other Status Codes

ErrorResponse

An unexpected 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

ListClusterUserCredentialCSPExample
ListClusterUserCredentialExample
ListClusterUserCredentialNonAadCSPExample
ListClusterUserCredentialNonAadExample

ListClusterUserCredentialCSPExample

Sample request

POST https://management.azure.com/subscriptions/1bfbb5d0-917e-4346-9026-1d3b344417f5/resourceGroups/k8sc-rg/providers/Microsoft.Kubernetes/connectedClusters/testCluster/listClusterUserCredential?api-version=2026-05-01

{
  "authenticationMethod": "AAD",
  "clientProxy": false
}

Sample response

{
  "kubeconfigs": [
    {
      "name": "credentialName1",
      "value": "WVhCcFZtVnljMmx2YmpvZ2RqRU5DbU5zZFhOMFpYSnpPZzBLTFNCamJIVnpkR1Z5T2cwS0lDQWdJR05sY25ScFptbGpZWFJsTFdGMWRHaHZjbWwwZVMxa1lYUmhPaUJNVXpCMFRGTXhRMUpWWkVwVWFVSkVVbFpLVlZOVldrcFJNRVpWVWxNd2RFeFRNSFJEYXpGS1UxVldOR1ZyVGtSUldFVnlXakJHTTFOVlNrSmFNR3hTVlRKMGRWZHNXblphZWtwMVZtcEtWbU5ZWkV0amJsWllUVEZDU0dWclJrOVJiV1J5WTFkb2NtRlZZelZrZWtKRFVWWkdlbEpyUmtWUlZUUkxWRlpHZW1Rd1RsSlhWVkpYVlZaR1JWSllaRXRoYkdWc1NsRXdiSEZSVlRWRFdqSjBlR0ZIZEhCU2Vtd3pUVVZLUWxWVlZrZFJWVVpRVVRCR2JrOUZSazVUVld4RVVUSmtURkV3Um01U1ZVVXdWMWhDTlVOc1VtdFVNVkpTVTFkTmRtVnNhRVJsUjNoVFpXdFZNRg=="
    }
  ]
}

ListClusterUserCredentialExample

Sample request

POST https://management.azure.com/subscriptions/1bfbb5d0-917e-4346-9026-1d3b344417f5/resourceGroups/k8sc-rg/providers/Microsoft.Kubernetes/connectedClusters/testCluster/listClusterUserCredential?api-version=2026-05-01

{
  "authenticationMethod": "AAD",
  "clientProxy": true
}

Sample response

{
  "hybridConnectionConfig": {
    "expirationTime": 1631196183,
    "hybridConnectionName": "microsoft.kubernetes/connectedclusters/229dc73f7b07196c79a93d4362d9c7fc4ed34df3e95290d27c56cec2dbb82865/1631185383340987904",
    "relay": "azgnrelay-ph0-l1",
    "relayTid": "33e01921-4d64-4f8c-a055-5bdaffd5e33d",
    "relayType": "byor",
    "token": "SharedAccessSignature 123456789034675890pbduwegiavifkuw647o02423bbhfouseb"
  },
  "kubeconfigs": [
    {
      "name": "credentialName1",
      "value": "WVhCcFZtVnljMmx2YmpvZ2RqRU5DbU5zZFhOMFpYSnpPZzBLTFNCamJIVnpkR1Z5T2cwS0lDQWdJR05sY25ScFptbGpZWFJsTFdGMWRHaHZjbWwwZVMxa1lYUmhPaUJNVXpCMFRGTXhRMUpWWkVwVWFVSkVVbFpLVlZOVldrcFJNRVpWVWxNd2RFeFRNSFJEYXpGS1UxVldOR1ZyVGtSUldFVnlXakJHTTFOVlNrSmFNR3hTVlRKMGRWZHNXblphZWtwMVZtcEtWbU5ZWkV0amJsWllUVEZDU0dWclJrOVJiV1J5WTFkb2NtRlZZelZrZWtKRFVWWkdlbEpyUmtWUlZUUkxWRlpHZW1Rd1RsSlhWVkpYVlZaR1JWSllaRXRoYkdWc1NsRXdiSEZSVlRWRFdqSjBlR0ZIZEhCU2Vtd3pUVVZLUWxWVlZrZFJWVVpRVVRCR2JrOUZSazVUVld4RVVUSmtURkV3Um01U1ZVVXdWMWhDTlVOc1VtdFVNVkpTVTFkTmRtVnNhRVJsUjNoVFpXdFZNRg=="
    }
  ]
}

ListClusterUserCredentialNonAadCSPExample

Sample request

POST https://management.azure.com/subscriptions/1bfbb5d0-917e-4346-9026-1d3b344417f5/resourceGroups/k8sc-rg/providers/Microsoft.Kubernetes/connectedClusters/testCluster/listClusterUserCredential?api-version=2026-05-01

{
  "authenticationMethod": "Token",
  "clientProxy": false
}

Sample response

{
  "kubeconfigs": [
    {
      "name": "credentialName1",
      "value": "WVhCcFZtVnljMmx2YmpvZ2RqRU5DbU5zZFhOMFpYSnpPZzBLTFNCamJIVnpkR1Z5T2cwS0lDQWdJR05sY25ScFptbGpZWFJsTFdGMWRHaHZjbWwwZVMxa1lYUmhPaUJNVXpCMFRGTXhRMUpWWkVwVWFVSkVVbFpLVlZOVldrcFJNRVpWVWxNd2RFeFRNSFJEYXpGS1UxVldOR1ZyVGtSUldFVnlXakJHTTFOVlNrSmFNR3hTVlRKMGRWZHNXblphZWtwMVZtcEtWbU5ZWkV0amJsWllUVEZDU0dWclJrOVJiV1J5WTFkb2NtRlZZelZrZWtKRFVWWkdlbEpyUmtWUlZUUkxWRlpHZW1Rd1RsSlhWVkpYVlZaR1JWSllaRXRoYkdWc1NsRXdiSEZSVlRWRFdqSjBlR0ZIZEhCU2Vtd3pUVVZLUWxWVlZrZFJWVVpRVVRCR2JrOUZSazVUVld4RVVUSmtURkV3Um01U1ZVVXdWMWhDTlVOc1VtdFVNVkpTVTFkTmRtVnNhRVJsUjNoVFpXdFZNRg=="
    }
  ]
}

ListClusterUserCredentialNonAadExample

Sample request

POST https://management.azure.com/subscriptions/1bfbb5d0-917e-4346-9026-1d3b344417f5/resourceGroups/k8sc-rg/providers/Microsoft.Kubernetes/connectedClusters/testCluster/listClusterUserCredential?api-version=2026-05-01

{
  "authenticationMethod": "Token",
  "clientProxy": true
}

Sample response

{
  "hybridConnectionConfig": {
    "expirationTime": 1631196183,
    "hybridConnectionName": "microsoft.kubernetes/connectedclusters/229dc73f7b07196c79a93d4362d9c7fc4ed34df3e95290d27c56cec2dbb82865/1631185383340987904",
    "relay": "azgnrelay-ph0-l1",
    "relayTid": "33e01921-4d64-4f8c-a055-5bdaffd5e33d",
    "relayType": "byor",
    "token": "SharedAccessSignature 123456789034675890pbduwegiavifkuw647o02423bbhfouseb"
  },
  "kubeconfigs": [
    {
      "name": "credentialName1",
      "value": "WVhCcFZtVnljMmx2YmpvZ2RqRU5DbU5zZFhOMFpYSnpPZzBLTFNCamJIVnpkR1Z5T2cwS0lDQWdJR05sY25ScFptbGpZWFJsTFdGMWRHaHZjbWwwZVMxa1lYUmhPaUJNVXpCMFRGTXhRMUpWWkVwVWFVSkVVbFpLVlZOVldrcFJNRVpWVWxNd2RFeFRNSFJEYXpGS1UxVldOR1ZyVGtSUldFVnlXakJHTTFOVlNrSmFNR3hTVlRKMGRWZHNXblphZWtwMVZtcEtWbU5ZWkV0amJsWllUVEZDU0dWclJrOVJiV1J5WTFkb2NtRlZZelZrZWtKRFVWWkdlbEpyUmtWUlZUUkxWRlpHZW1Rd1RsSlhWVkpYVlZaR1JWSllaRXRoYkdWc1NsRXdiSEZSVlRWRFdqSjBlR0ZIZEhCU2Vtd3pUVVZLUWxWVlZrZFJWVVpRVVRCR2JrOUZSazVUVld4RVVUSmtURkV3Um01U1ZVVXdWMWhDTlVOc1VtdFVNVkpTVTFkTmRtVnNhRVJsUjNoVFpXdFZNRg=="
    }
  ]
}

Definitions

Name Description
AuthenticationMethod

The mode of client authentication.

CredentialResult

The credential result response.

CredentialResults

The list of credential result response.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

HybridConnectionConfig

Contains the REP (rendezvous endpoint) and “Sender” access token.

ListClusterUserCredentialProperties

AuthenticationMethod

The mode of client authentication.

Value Description
Token
AAD

CredentialResult

The credential result response.

Name Type Description
name

string

The name of the credential.

value

string (byte)

Base64-encoded Kubernetes configuration file.

CredentialResults

The list of credential result response.

Name Type Description
hybridConnectionConfig

HybridConnectionConfig

Contains the REP (rendezvous endpoint) and “Sender” access token.

kubeconfigs

CredentialResult[]

Base64-encoded Kubernetes configuration file.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

HybridConnectionConfig

Contains the REP (rendezvous endpoint) and “Sender” access token.

Name Type Description
expirationTime

integer (int64)

Timestamp when this token will be expired.

hybridConnectionName

string

Name of the connection

relay

string

Name of the relay.

relayTid

string

TenantID of the relay

relayType

string

Type of relay

token

string

Sender access token

ListClusterUserCredentialProperties

Name Type Description
authenticationMethod

AuthenticationMethod

The mode of client authentication.

clientProxy

boolean

Boolean value to indicate whether the request is for client side proxy or not