Adrian Hynes

Nov 8, 2020

3 min read

Creating an Azure az cli extension for AKS Non Interactive Auth


In the previous 4 part article series, we went through how Authentication and Authorization works in your AKS RBAC enabled cluster, as well as how you can Non Interactively connect to your AKS cluster.

Project Structure and Files

Let’s first create our required project structure. You can check out Microsoft’s real examples here for some help on your az cli extension journey:


I’ve pretty much lifted and shifted the code from our AKS Non Interactive Auth project in the previous series from here to here

  1. Clone down
  2. Create our python wheel
python bdist_wheel
az extension add — source C:\Users\Adrian\aksauth\dist\aksauth-0.0.1-py2.py3-none-any.whl
az aksauth connect --resource-group adrian-group --subscription xxxxxx–aaaa–bbbb-cccc–zzzzzzz --cluster-name adrian-cluster --tenant 00000000–2222–5555–9999-222222 --username --password “hard2Guess”

Appendix: Reference Material