az aks create fails with: "Details: token contains an invalid number of segments"

Gildas Cherruel 1 Reputation point
2020-06-05T01:05:26.963+00:00

Whenever I try to create a new k8s cluster, following the documentation: https://video2.skills-academy.com/en-us/azure/aks/kubernetes-walkthrough, I get an error since yesterday.

This used to work perfectly well, at least until several weeks ago. But now I get this:

> Finished service principal creation[##################################] 100.0000%Operation failed with status: 'Bad Request'. Details: The credentials in ServicePrincipalProfile were invalid. Please see https://aka.ms/aks-sp-help for more details. (Details: token contains an invalid number of segments)

The command I used was (besides the names) what the doc said:

az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 1 --enable-addons monitoring --generate-ssh-keys  

It seems someone else bumped into this as well: https://github.com/MicrosoftDocs/azure-docs/issues/56103

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.
2,080 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Marcos-MSFT 6 Reputation points Microsoft Employee
    2020-06-05T04:02:01.823+00:00

    Hello,

    Can you confirm the version of AzCLI you're using by running az --version?

    Also, are you able to reproduce the same issue by using CloudShell?

    Marcos M Martinez

    0 comments No comments

  2. vdL 1 Reputation point
    2020-06-11T10:48:45.153+00:00

    I have the same issue. AZ version is 2.7.0.

    The CloudShell behaves the same, same error message.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.