Auditing Copilot Credit Spending Policies ('Auto Apply New Services') & Entra Agent ID Inactivity Governance

✨ AI Governance Brief β€” Post-Ignite 2026 Cost & Agent Sprawl Controls
  • The Hidden Cost Trap: Default Microsoft 365 Copilot credit-based spending policies ship with "Auto apply new services" enabledβ€”meaning newly released PAYG AI services can begin consuming Azure credits across production users without explicit change-control approval.
  • The Hidden Security Trap: Entra Agent ID now governs multi-platform agents (Copilot Studio, Bedrock, Anthropic, OpenAI, GitHub Copilot CLI, Claude Code). Dormant or ownerless agent blueprints create silent lateral-movement risk unless governed by automatic inactivity policies.
  • Actionable Audit: Use the PowerShell 7 + Microsoft Graph script below to inventory stale non-human agent identities and enforce Azure Resource Group budget caps before credit meters spike.

Following Microsoft Ignite 2026, two quiet default settings have caught enterprise M365 administrators off guard:

  1. Credit-Based Billing Creep: As Microsoft shifts SharePoint Agents, Copilot Chat extensions, and agentic connectors onto unified Copilot Credit / Pay-As-You-Go (PAYG) billing policies, the default toggle "Auto apply new services" automatically opts your billing policy into future metered AI services as Microsoft launches them.
  2. Dormant Agent Sprawl: With users permitted to create declarative agents and agent identity blueprints by default unless restricted, tenants rapidly accumulate abandoned test agents holding active Graph API permissions.

This runbook walks you through locking down Copilot Spending Policies and automating Entra Agent ID Inactivity Audits with Microsoft Graph PowerShell.


1. Post-Ignite 2026 Dual Control Plane: FinOps + Agent Lifecycle

Post-Ignite 2026 Guardrails: Copilot Credit Caps & Agent Inactivity TRACK 1: COPILOT CREDIT SPENDING POLICIES 1. Disable "Auto apply new services" in M365 Admin Center 2. Scope PAYG policy to an Entra Security Group (not All Users) 3. Bind dedicated Azure Resource Group + 50/80/100% Budget Alerts Prevents Unapproved Credit Consumption Spikes TRACK 2: ENTRA AGENT ID INACTIVITY LIFECYCLE 1. Restrict default Agent Blueprint creation to Approved Makers 2. Require mandatory Human Sponsor on every Agent Blueprint 3. Auto-disable dormant agents (0 sign-ins in 60–90 days) Eliminates Ownerless & Abandoned AI Identities Review both tracks monthly inside Agent 365 Business Analytics & Microsoft Entra Admin Center.

2. Auditing & Hardening Copilot Credit Spending Policies

In Microsoft 365 Admin Center → Copilot → Billing & usage (Cost Management) → Billing policies:

  1. Open every active Pay-As-You-Go (PAYG) billing policy.
  2. Locate Connected services and uncheck "Auto apply new services" (or verify it is explicitly disabled). When enabled, any new metered Copilot capability Microsoft releases is silently attached to your Azure subscription.
  3. Verify Users / Groups Scope is bound to a governed Entra security group (e.g., SEC-Copilot-PAYG-Pilot) rather than Everyone / All Users.
  4. Pair every billing policy with an Azure Cost Management Budget targeting the linked Resource Group with automated alerts at 50%, 80%, and 100% forecasted monthly spend.

3. Auditing Dormant & Ownerless AI Agent Identities (Microsoft Graph PowerShell)

With Entra Agent ID expanding across both Microsoft-native and third-party agents (Bedrock, Anthropic, OpenAI, Claude Code, Copilot CLI), run this PowerShell 7 script monthly to identify dormant or ownerless workload/agent identities that have had zero sign-in activity for 60+ days:

POWERSHELL
#Requires -Modules Microsoft.Graph.Authentication
<#
.SYNOPSIS
    Audit-DormantAgentIdentities.ps1
    Flags active Entra ID Service Principals / AI Agent Identities with no sign-ins in 60+ days or missing owners.
#>

param(
    [int]$InactiveDays = 60
)

Connect-MgGraph -Scopes "Application.Read.All", "AuditLog.Read.All", "Directory.Read.All" -NoWelcome

$cutoffDate = (Get-Date).AddDays($InactiveDays)
Write-Host "[*] Scanning enabled Workload & AI Agent Identities (Cutoff: $($cutoffDate.ToString('yyyy-MM-dd')))..." -ForegroundColor Cyan

# 1. Fetch sign-in activity summary for service principals (requires Entra ID P1/P2)
$spActivityMap = @{}
$activityUri = "https://graph.microsoft.com/beta/reports/servicePrincipalSignInActivities?`$top=500"
do {
    $actPage = Invoke-MgGraphRequest -Method GET -Uri $activityUri
    foreach ($item in $actPage.value) {
        $lastSignIn = $item.lastSignInActivity.lastSignInDateTime
        if (-not $lastSignIn) { $lastSignIn = $item.applicationAuthenticationClientSignInActivity.lastSignInDateTime }
        $spActivityMap[$item.appId] = $lastSignIn
    }
    $activityUri = $actPage.'@odata.nextLink'
} while ($activityUri)

# 2. Fetch enabled custom/agent service principals
$spUri = "https://graph.microsoft.com/v1.0/servicePrincipals?`$filter=accountEnabled eq true&`$select=id,appId,displayName,servicePrincipalType,tags,createdDateTime&`$top=500"
$findings = [System.Collections.Generic.List[PSCustomObject]]::new()

do {
    $page = Invoke-MgGraphRequest -Method GET -Uri $spUri
    foreach ($sp in $page.value) {
        # Focus on custom apps, Copilot Studio / Agent identities, and non-legacy principals
        $isAgentOrCustom = ($sp.tags -contains "WindowsAzureActiveDirectoryIntegratedApp") -or
                           ($sp.servicePrincipalType -in @("Application", "ManagedIdentity")) -or
                           ($sp.displayName -match "Agent|Copilot|Bot|AI")
        if (-not $isAgentOrCustom) { continue }

        $lastRaw = $spActivityMap[$sp.appId]
        $lastDt = if ($lastRaw) { [datetime]$lastRaw } else { $null }
        $isDormant = ($null -eq $lastDt) -or ($lastDt -lt $cutoffDate)

        if ($isDormant) {
            $owners = (Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/servicePrincipals/$($sp.id)/owners?`$select=userPrincipalName").value
            $findings.Add([PSCustomObject]@{
                DisplayName   = $sp.displayName
                AppId         = $sp.appId
                Type          = $sp.servicePrincipalType
                Created       = ([datetime]$sp.createdDateTime).ToString("yyyy-MM-dd")
                LastSignIn    = if ($lastDt) { $lastDt.ToString("yyyy-MM-dd") } else { "Never / >90d" }
                OwnerCount    = $owners.Count
                Owners        = ($owners.userPrincipalName -join "; ")
                ActionNeeded  = if ($owners.Count -eq 0) { "DISABLE: Ownerless & Dormant" } else { "Notify Owner & Review" }
            })
        }
    }
    $spUri = $page.'@odata.nextLink'
} while ($spUri)

$findings | Sort-Object OwnerCount, LastSignIn | Export-Csv -Path ".\Dormant-AI-Agent-Identities.csv" -NoTypeInformation -Encoding UTF8
Write-Host "[+] Found $($findings.Count) dormant workload/agent identities. Exported to Dormant-AI-Agent-Identities.csv" -ForegroundColor Yellow

4. Recommended Post-Ignite 2026 Governance Checklist

  • [ ] Audit all M365 Copilot PAYG billing policies and disable "Auto apply new services".
  • [ ] Configure Azure Cost Management monthly budget caps on the dedicated Copilot PAYG Resource Group.
  • [ ] Restrict default Agent Identity Blueprint creation in Microsoft Entra to approved developers/admins.
  • [ ] Enable Entra Agent ID inactivity policies and run Audit-DormantAgentIdentities.ps1 monthly.
  • [ ] Cross-check your tenant's full Copilot posture with our Complete 10-Chapter AI for M365 Administrators Playbook.

πŸ’¬ Reader Comments & Feedback

Did this runbook help, or did Microsoft change a cmdlet or UI menu? Share your feedback below.