Skip to content

Auth Commands

Manage service principal authentication profiles.

Overview

Service principals enable automated Azure authentication without interactive login. Use these commands to set up and manage authentication profiles for CI/CD, automation, and production access.

Available Commands

Quick Start

Setup Profile

# Create auth profile
azlin auth setup --profile production

# Test authentication
azlin auth test --profile production

Use with Commands

# Use profile with any command
azlin list --auth-profile production
azlin new --name prod-vm --auth-profile production

# Or via context
azlin context create prod   --subscription prod-sub   --tenant prod-tenant   --auth-profile production

Use Cases

CI/CD Integration

# Set up CI profile
azlin auth setup --profile ci-cd

# In CI pipeline
export AZLIN_AUTH_PROFILE=ci-cd
azlin new --name build-$BUILD_ID
azlin connect build-$BUILD_ID --command './run-tests.sh'
azlin kill build-$BUILD_ID

Production Automation

# Production profile for automation
azlin auth setup --profile prod-automation

# Automated tasks
azlin batch stop --tag 'env=dev' --auth-profile prod-automation

See Also