1-azure-auth-check

$npx mdskill add microsoft/acs-resource-explorer/1-azure-auth-check

Use this skill when you need to verify Azure authentication before performing Azure operations, or when troubleshooting authentication issues.

SKILL.md

.github/skills/1-azure-auth-checkView on GitHub ↗
---
name: 1-azure-auth-check
description: Verify Azure authentication status and display connection information (tenant, account, subscription context). Works with any Azure product or service.
---

## When to use this skill
Use this skill when you need to verify Azure authentication before performing Azure operations, or when troubleshooting authentication issues.

Examples:
  - "Check if I'm authenticated to Azure"
  - "Show my current Azure connection info"
  - "Verify my Azure tenant and subscription context"
  - "Am I connected to the right Azure account?"

## Preconditions
- Azure CLI installed (`az` command available)
- Installation: https://learn.microsoft.com/en-us/cli/azure/?view=azure-cli-latest (Windows, macOS, Linux)

## Workflow

### 1) **Check Azure CLI Installation**
   - Verify `az` is available:
     ```bash
     az version
     ```
   - If not installed, provide installation instructions:
     ```
     Install Azure CLI: https://learn.microsoft.com/en-us/cli/azure/?view=azure-cli-latest
     ```
   - Exit with clear error if CLI unavailable

### 2) **Check Existing Azure Context**
   - Run `az account show` to check for an existing authenticated session
   - If context exists:
     - Extract tenant ID, account ID, and current subscription
     - Display connection status: ✅ "Already authenticated"
   - If no context exists (error or "Please run 'az login'"):
     - Display: ⚠️ "Not authenticated to Azure"

### 3) **Authenticate if Needed**
   - If no existing context:
     - Prompt user: "Would you like to connect now? (Y/N)"
     - If Yes: Run `az login`
     - If No: Exit with message "Authentication required to continue"
   - Handle authentication errors gracefully

### 4) **Display Connection Information**
   - Show authenticated user details:
     ```
     ✅ Connected to Azure

     Account:   [email protected]
     Tenant ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
     Current Subscription: Subscription Name (sub-id)
     ```

### 5) **Provide Multi-Tenant Guidance (if applicable)**
   - If the user needs to connect to a different tenant, inform them:
     ```
     Note: To connect to a different tenant, use:
     az login --tenant 'your-tenant-id'
     ```

### 6) **Save Context for Subsequent Skills**
   - Store authentication context in session state:
     - Tenant ID
     - Account ID
     - Current subscription (if any)
   - This allows downstream skills to skip re-authentication

## Output
- Authentication status (authenticated/not authenticated)
- Tenant information
- Account details
- Current subscription context
- Session state saved for use by subsequent skills

## Related Skills
- Use **2-azure-subscription-select** after this skill to choose subscriptions to scan
- Required before any Azure resource scanning or metrics collection skills

## Example Invocation
```
User: "Check my Azure authentication"
Agent: [Runs 1-azure-auth-check skill]
Output:
  ✅ Connected to Azure
  Account: [email protected]
  Tenant ID: abc123...
  Current Subscription: Production (sub-123...)
```

More from microsoft/acs-resource-explorer

SkillDescription
0-acs-full-scanFull ACS deprecation impact assessment orchestrator. Runs the complete workflow — auth check, subscription selection, ACS resource scan, channel detection (fast or full), impact analysis, and report generation. ACS-specific, no PowerShell script required.
1-acs-resource-scanScan Azure subscriptions for Azure Communication Services (ACS) resources (Microsoft.Communication/CommunicationServices). ACS-specific version of azure/3-azure-resource-scan with resource type pre-filled.
2-acs-channel-detectFast, resource-based detection of ACS channels (Email, Phone Numbers). Detects Email via EmailServices/Domains child resources and Phone Numbers via purchased phone Numbers under each ACS resource. Note: SMS, Chat, Call Automation, Job Router, Advance Messaging, and Rooms require metrics — use 3-acs-metrics-collect for complete detection.
2-azure-subscription-selectInteractive subscription selection workflow. Choose specific subscription(s) or scan all accessible subscriptions. Works with any Azure product or service.
3-acs-metrics-collectComprehensive ACS usage detection via Azure Monitor metrics. All configured ACS channels are pre-mapped (Email, SMS, Chat, Call Automation, Job Router, Advance Messaging, Rooms). Configurable lookback period of 1-93 days.
3-azure-resource-scanScan Azure subscriptions for specific resource types. Interactive prompts allow scanning any Azure product (ACS, Storage, Compute, Databases, etc). Returns resource inventory across selected subscriptions.
4-acs-impact-analyzeMap detected ACS channel usage to the appropriate Retirement Guide or Breaking Change Guide. Links each impacted resource to Microsoft migration resources per channel.
4-azure-channel-detectFast, resource-based feature detection for Azure resources. Detects features/channels by examining related child resources (domains, endpoints, configurations). Works with any Azure product where features are exposed as sub-resources.
5-acs-report-generateGenerate ACS deprecation impact reports in CSV, Markdown, or JSON format. Pre-configured with ACS channel columns, migration guide links, and ACS-specific report sections.
5-azure-metrics-collectComprehensive feature/usage detection via Azure Monitor metrics. Collects usage data over configurable lookback period (1-93 days). Works with any Azure product that emits metrics to Azure Monitor.