Share via


Managed Clusters - List Cluster Admin Credentials

Lists the admin credentials of a managed cluster.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential?api-version=2025-08-01
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential?api-version=2025-08-01&server-fqdn={server-fqdn}

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

minLength: 1
maxLength: 90

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

resourceName
path True

string

minLength: 1
maxLength: 63
pattern: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$

The name of the managed cluster resource.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

server-fqdn
query

string

server fqdn type for credentials to be returned

Responses

Name Type Description
200 OK

CredentialResults

OK

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

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 Managed Cluster

Sample request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/listClusterAdminCredential?api-version=2025-08-01

Sample response

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

Definitions

Name Description
CredentialResult

The credential result response.

CredentialResults

The list credential result response.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

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 credential result response.

Name Type Description
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.