Azure Arc Service Principal Expiry Monitoring

Automated Credential Monitoring with Proactive Alerts Before Onboarding Breaks

📖 15 min read
🎯 Intermediate
🔧 Monitoring Solution
💡 Azure Arc + Logic Apps + Sentinel

Introduction

When implementing Azure Arc at scale, service principal credentials power your automated server onboarding. These credentials have expiration dates - and when they expire, your onboarding scripts fail.

The script executes, the agent installs, but nothing gets onboarded to Azure Arc. You're left with servers that appear configured but are completely invisible to Arc management, security policies, and monitoring.

The Impact: Missing Azure Arc agents means missing security coverage, operational visibility, and compliance monitoring. Servers exist in your environment but are completely unmanaged - a significant security and operational risk.

This monitoring solution provides automated service principal expiry tracking with proactive alerts, ensuring your Azure Arc onboarding remains operational.

Note: Microsoft deprecated Teams webhooks in late 2024, requiring migration to Logic Apps or similar solutions for any notification workflows.

Solution Overview

This monitoring solution checks Azure Arc service principal credential expiry and sends proactive alerts before credentials expire.

Technology Approach

  • Azure Automation - Scheduled credential checks using managed identity
  • Microsoft Graph API - Reads service principal credential expiry dates
  • Alert Delivery - Azure Logic Apps for Teams notifications OR Microsoft Sentinel for incident tracking
  • Proactive Timing - Alerts at 7 days, 3 days, and expiry events

The solution monitors Azure Arc onboarding service principal credentials and alerts your team before expiry impacts production.

Two Monitoring Approaches

Option 1: Logic Apps with Teams Notifications

Direct notification approach for operational teams:

  • Azure Automation runbook checks credential expiry
  • Logic App receives expiry data via HTTP trigger
  • Adaptive cards posted to Microsoft Teams channel
  • Team sees alerts immediately in their workflow

Option 2: Microsoft Sentinel Integration

Security operations approach for centralized monitoring:

  • Azure Automation checks credentials and creates Sentinel incidents
  • Incidents include full credential details and context
  • Security team manages through existing Sentinel workflows
  • Complete audit trail in security operations platform
Choose Based On: Use Logic Apps for operational teams who need immediate Teams notifications. Use Sentinel for security teams managing multiple alert sources centrally.

Technical Requirements

Azure Environment

  • Active Azure subscription with Automation Account capability
  • Azure Arc service principal with credentials to monitor
  • Entra ID permissions to read application registrations

For Logic Apps Approach

  • Azure Logic Apps workspace
  • Microsoft Teams with target channel
  • Service account with Teams access (licensed, secured with Conditional Access)

For Sentinel Approach

  • Microsoft Sentinel workspace configured
  • Sentinel Responder permissions for incident creation

Skills Needed

  • Azure Automation Account configuration
  • PowerShell and Microsoft Graph API experience
  • Basic Logic Apps or Sentinel familiarity

Implementation Scope

The complete solution includes four main implementation phases:

  1. Azure Automation Setup - Create Automation Account with system-assigned managed identity and custom runtime environment
  2. Permissions Configuration - Delegate Microsoft Graph permissions to read application credentials
  3. Alert Delivery Setup - Configure either Logic Apps with Teams integration OR Sentinel incident creation
  4. Monitoring Deployment - Deploy and test credential monitoring with scheduled execution

Alert Timing & Frequency

Default alert thresholds are 7 days, 3 days, and expiry - but you configure these to match your needs:

  • 7 Days Before Expiry - Early warning to plan credential renewal (configurable)
  • 3 Days Before Expiry - Urgent reminder to renew credentials (configurable)
  • Expired Credentials - Immediate alert when onboarding is broken

Set your own check frequency (daily recommended) and customize alert thresholds to match your operational requirements.

Fully Configurable: Adjust alert thresholds, check frequency, and notification timing to fit your team's workflow and credential renewal processes.

Complete Implementation Guide

The full Azure Arc service principal monitoring solution includes:

  • Azure Automation Account configuration guide
  • System-assigned managed identity setup
  • Microsoft Graph permissions delegation
  • Logic Apps HTTP trigger and Teams integration
  • Microsoft Sentinel incident creation approach
  • Complete PowerShell monitoring scripts
  • Adaptive card templates for Teams notifications
  • Testing and validation procedures
  • Troubleshooting guidance
Member Resources: Access the complete implementation guide, PowerShell automation scripts, Logic Apps templates, and ongoing support through the member portal.

About the Author

Kaido Järvemets - Microsoft MVP

Kaido Järvemets

Microsoft MVP | Microsoft Hybrid-Cloud Security Expert

With over 15 years of experience in IT, cybersecurity, and Microsoft technologies, Kaido specializes in Microsoft Azure, Microsoft 365, and hybrid-cloud security solutions. As a Microsoft MVP since 2010, he has deep expertise in Configuration Manager, Enterprise Mobility, and Azure Hybrid & Security.

Kaido is a Microsoft Certified Trainer who has been traveling across Europe for the past 12 years, speaking at events including the Microsoft Management Summit and Midwest Management Summit. He founded User Group Estonia and System Center User Group Estonia, building strong communities of Microsoft technology professionals.

🎯 Specializations

Microsoft Security:
  • Microsoft Defender XDR
  • Microsoft Sentinel SIEM & SOAR
  • Microsoft Entra ID (Azure AD)
  • Microsoft Intune
Azure & Hybrid Cloud:
  • Azure Arc Services
  • Azure Log Analytics
  • Azure Automation
  • Hybrid Cloud Management

"I simplify the process and make each change meaningful. It's all about adopting modern solutions that replace archaic ones and make the workplace easier for everyone involved."