AKS Update-Credentials fails with usage error

Gary Baker 1 Reputation point

Azure Advisor has identified that the service principal on one of our AKS clusters has expired.

I have followed the instructions here: https://learn.microsoft.com/en-gb/azure/aks/update-credentials?WT.mc_id=Portal-Microsoft_Azure_Health#update-aks-cluster-with-new-service-principal-credentials

The command that fails is of the form: az aks update-credentials --resource-group resourcegroupname --name clustername --reset-service-principal --service-principal servicepricipal --client-secret password(obtained from a credential reset)

The update-credentials command fails with usage error: --reset-service-principal | --reset-aad-profile

I have no idea what this means, or how to overcome it. If anyone has any ideas, or suggestions to try, that would be excellent.


Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,778 questions
{count} votes

1 answer

Sort by: Most helpful
  1. shiva patpi 12,961 Reputation points Microsoft Employee

    Hello @Gary Baker ,
    That's the right command, even I just tried the exact same command which went through successfully.
    Can you try to type those commands in the command prompt and try out - there might be some special characters?
    You can also try to use Azure Portal CLI instead of normal command line. It should definitely go through.


    0 comments No comments