#!/bin/bash

# Set your Key Vault name
KEY_VAULT="Kimi"

echo "Fetching Azure AD demo user passwords from Key Vault: $KEY_VAULT"
echo ""

# Loop through 10 demo users
for i in {1..10}; do
  USERNAME="demo-user-${i}@jacquesingram.onmicrosoft.com"
  SECRET_NAME="demo-user-${i}-password"

  PASSWORD=$(az keyvault secret show --vault-name "$KEY_VAULT" --name "$SECRET_NAME" --query value -o tsv)

  echo "Username: $USERNAME"
  echo "Password: $PASSWORD"
  echo "----------------------------"
done