Chapter Navigation:
- 📚 Course Home: AZD For Beginners
- 📖 Current Chapter: Chapter 1 - Foundation & Quick Start
- ⬅️ Previous: AZD Basics
- ➡️ Next: Your First Project
- 🚀 Next Chapter: Chapter 2: AI-First Development
This comprehensive guide will walk you through installing and configuring Azure Developer CLI (azd) on your system. You'll learn multiple installation methods for different operating systems, authentication setup, and initial configuration to prepare your development environment for Azure deployments.
By the end of this lesson, you will:
- Successfully install Azure Developer CLI on your operating system
- Configure authentication with Azure using multiple methods
- Set up your development environment with necessary prerequisites
- Understand different installation options and when to use each
- Troubleshoot common installation and setup issues
After completing this lesson, you will be able to:
- Install azd using the appropriate method for your platform
- Authenticate with Azure using azd auth login
- Verify your installation and test basic azd commands
- Configure your development environment for optimal azd usage
- Resolve common installation problems independently
This guide will help you install and configure Azure Developer CLI on your system, regardless of your operating system or development environment.
Before installing azd, ensure you have:
- Azure subscription - Create a free account
- Azure CLI - For authentication and resource management
- Git - For cloning templates and version control
- Docker (optional) - For containerized applications
winget install microsoft.azd# Useful when winget is unavailable
powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/install-azd.ps1' | Invoke-Expression"choco install azd- Download the latest release from GitHub
- Extract to
C:\Program Files\azd\ - Add to PATH environment variable
brew tap azure/azd
brew install azdcurl -fsSL https://aka.ms/install-azd.sh | bash# Download and install
curl -fsSL https://aka.ms/install-azd.sh | bash -s -- --base-url https://github.com/Azure/azure-dev/releases/latest/download --verbosecurl -fsSL https://aka.ms/install-azd.sh | bashManual installation from release assets:
# Download the latest archive for your Linux architecture from:
# https://github.com/Azure/azure-dev/releases
# Then extract it and add the azd binary to your PATH.Some Codespaces and dev container environments already include azd, but you should verify that rather than assume it:
azd versionIf azd is missing, install it with the standard script for the environment.
# Run azd in a container
docker run --rm -it -v $(pwd):/workspace mcr.microsoft.com/azure-dev-cli-tools:latest
# Create an alias for easier use
alias azd='docker run --rm -it -v $(pwd):/workspace mcr.microsoft.com/azure-dev-cli-tools:latest azd'After installation, verify azd is working correctly:
# Check version
azd version
# View help
azd --help
# List available templates
azd template listExpected output:
azd version 1.x.x (commit xxxxxx)
Note: The actual version number will vary. Check Azure Developer CLI releases for the latest version.
✅ Installation Success Checklist:
-
azd versionshows version number without errors -
azd --helpdisplays command documentation -
azd template listshows available templates - You can create a test directory and run
azd initsuccessfully
If all checks pass, you're ready to proceed to Your First Project!
For AZD-first workflows, sign in with azd auth login.
# Required for AZD commands such as azd up
azd auth login
# Verify AZD authentication status
azd auth login --check-statusUse Azure CLI sign-in only when you plan to run az commands yourself during the course.
# Install Azure CLI if not already installed
# Windows: winget install Microsoft.AzureCLI
# macOS: brew install azure-cli
# Linux: see the Azure CLI install docs for your distribution
# Login to Azure
az login
# Verify authentication
az account show- Use
azd auth loginif you are following the beginner AZD path and mainly runningazdcommands. - Use
az loginas well when you want to run Azure CLI commands such asaz account showor inspect resources directly. - If an exercise includes both
azdandazcommands, run both sign-in commands once at the start.
If you're on a headless system or having browser issues:
azd auth login --use-device-codeFor automated environments:
azd auth login \
--client-id <client-id> \
--client-secret <client-secret> \
--tenant-id <tenant-id>If you want a quick readiness check before starting Chapter 1:
Windows:
.\validate-setup.ps1macOS / Linux:
bash ./validate-setup.sh# Set default subscription
azd config set defaults.subscription <subscription-id>
# Set default location
azd config set defaults.location eastus2
# View all configuration
azd config showAdd to your shell profile (.bashrc, .zshrc, .profile):
# Azure configuration
export AZURE_SUBSCRIPTION_ID="your-subscription-id"
export AZURE_LOCATION="eastus2"
# azd configuration
export AZD_ALPHA_ENABLE_APPSERVICE_REMOTE_DEBUGGING=true
export AZD_DEBUG=true # Enable debug loggingInstall the Azure Developer CLI extension:
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Azure Developer CLI"
- Install the extension
Features:
- IntelliSense for azure.yaml
- Integrated terminal commands
- Template browsing
- Deployment monitoring
Create a .devcontainer/devcontainer.json:
{
"name": "Azure Developer CLI",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/azure/azure-dev/azd:latest": {}
},
"postCreateCommand": "azd version"
}- Install the Azure plugin
- Configure Azure credentials
- Use integrated terminal for azd commands
# Run PowerShell as Administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserManually add azd to your PATH:
Windows:
setx PATH "%PATH%;C:\Program Files\azd\"macOS/Linux:
echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrc
source ~/.bashrc# Configure proxy
azd config set http.proxy http://proxy:8080
azd config set https.proxy https://proxy:8080
# Skip SSL verification (not recommended for production)
azd config set http.insecure true# Remove old installations
# Windows: winget uninstall microsoft.azd
# macOS: brew uninstall azd
# Linux: remove the previous azd binary or symlink before reinstalling
# Clean configuration
rm -rf ~/.azd# Enable debug logging
export AZD_DEBUG=true
azd <command> --debug
# View current configuration
azd config show
# View current deployment status
azd showazd warns when a newer release is available, and you can confirm your current build with:
azd versionWindows (winget):
winget upgrade microsoft.azdmacOS (Homebrew):
brew upgrade azdLinux:
curl -fsSL https://aka.ms/install-azd.sh | bashWhat's the difference between azd and az CLI?
Azure CLI (az): Low-level tool for managing individual Azure resources
az webapp create,az storage account create- One resource at a time
- Infrastructure management focus
Azure Developer CLI (azd): High-level tool for complete application deployments
azd updeploys entire app with all resources- Template-based workflows
- Developer productivity focus
You need both: azd uses az CLI for authentication
Can I use azd with existing Azure resources?
Yes! You can:
- Import existing resources into azd environments
- Reference existing resources in your Bicep templates
- Use azd for new deployments alongside existing infrastructure
See Configuration Guide for details.
Does azd work with Azure Government or Azure China?
Yes, configure the cloud:
# Azure Government
az cloud set --name AzureUSGovernment
az login
# Azure China
az cloud set --name AzureChinaCloud
az loginCan I use azd in CI/CD pipelines?
Absolutely! azd is designed for automation:
- GitHub Actions integration
- Azure DevOps support
- Service principal authentication
- Non-interactive mode
See Deployment Guide for CI/CD patterns.
What's the cost of using azd?
azd itself is completely free and open-source. You only pay for:
- Azure resources you deploy
- Azure consumption costs (compute, storage, etc.)
Use azd provision --preview to estimate costs before deployment.
- Complete authentication: Ensure you can access your Azure subscription
- Try your first deployment: Follow the First Project Guide
- Explore templates: Browse available templates with
azd template list - Configure your IDE: Set up your development environment
If you encounter issues:
- Official Documentation
- Report Issues
- Community Discussions
- Azure Support
- Azure Agent Skills - Get Azure command guidance directly in your editor with
npx skills add microsoft/github-copilot-for-azure
Chapter Navigation:
- 📚 Course Home: AZD For Beginners
- 📖 Current Chapter: Chapter 1 - Foundation & Quick Start
- ⬅️ Previous: AZD Basics
- ➡️ Next: Your First Project
- 🚀 Next Chapter: Chapter 2: AI-First Development
✅ Installation Complete! Continue to Your First Project to start building with azd.