Azure/azure-workload-identity

az login --federated token ****** is not working as expected

ssvarian opened this issue · 2 comments

Describe the bug
az login --federated-token "$(cat $AZURE_FEDERATED_TOKEN_FILE)" --service-principal -u $AZURE_CLIENT_ID -t $AZURE_TENANT_ID
is reporting that ERROR: No subscriptions found for 97d5***************************

Steps To Reproduce

login to azure using federated credentials
Expected behavior

Should login and should be able to access the keyvault secrets
Logs

Environment

  • Kubernetes version (use kubectl version): 1.27.3
  • Cloud provider or hardware configuration: AKS

@ssvarian I had the same issue and it was caused by not adding the user assigned managed identity to the subscription RBAC.

Thanks @wizedkyle , I was able to fix it by passing the flag "--allow-no-subscription" for az login command..