↓ Skip to main content
  1. Posts/

Agent 365: the sponsor left, the approval stayed

Stein-Erik Alvestad
Author
Stein-Erik Alvestad
Technical notes from the field.

Introduction
#

In the last post I built an allow-list for agents: Conditional Access blocks every agent identity, except the ones whose custom security attribute ApprovalStatus says IT_Approved. Approving an agent is one attribute change. I ended with a promise: next up, automating the revoke. None of the events that should end an approval, such as a sponsor leaving or an agent being disabled, change the attribute by themselves, so something has to.

One of the comments on that post put the hardest case well. When the sponsor leaves or changes roles, the agent may still have its approval, even though nobody owns that decision any more. The exception shouldn’t survive by default.

That’s the case I tested first. It turned out to be more interesting than I expected.

What I wanted to know
#

  • When a sponsor leaves, does the manager take over their agents automatically, or only if you’ve set up a leaver workflow? Microsoft’s own documentation says both. The page Manage agent identities says Entra “automatically reassigns sponsorship to the sponsor’s manager”. The page Agent identity sponsor tasks describes a Lifecycle Workflows task that you have to set up to do exactly that.
  • Does the built-in workflow task Transfer agent sponsorships to manager work, and how fast?
  • Does it matter whether the sponsor is disabled or deleted?
  • And the one that matters most: what happens to the approval?

The test
#

I made three test users, each with the same manager, and gave each one its own agent identity from the same blueprint. All three agents started as IT_Approved. Then each sponsor left in a different way, the way HR would do it: a leave date set to today, then the account disabled or deleted.

  • Sponsor A was disabled. No workflow.
  • Sponsor B was disabled, and then the leaver workflow ran for them. I used Microsoft’s template Transition agent sponsorships when a sponsor leaves, unchanged, and ran it on demand.
  • Sponsor C was deleted. No workflow.

Two agents from the last post came along for the lifecycle policy later on: Finance-Assistant, with an active sponsor, as a control, and Invoice-Bot, whose only sponsor has been disabled since 10 November.

Everything was scripted with Microsoft Graph PowerShell, with -WhatIf first, and every check saved a snapshot of the sponsors, the agent’s state, the attribute, the workflow results and the audit log. Here’s what happened:

Three ways a sponsor left, and what happened to the agent. Sponsor A, disabled with no workflow: nothing transfers, the disabled user stays listed as sponsor, which looks fine at a glance; approval still IT_Approved, nobody notices. Sponsor B, disabled plus Microsoft’s leaver workflow run on demand: the transfer was canceled, because with no co-sponsors task 2 fails; after fixing the workflow the manager was sponsor in 19 seconds; approval still IT_Approved, inherited. Sponsor C, deleted with no workflow: the sponsor link is gone silently, zero sponsors left and no audit event on the agent; approval still IT_Approved, orphaned. In all three, Entra never touched the approval: ApprovalStatus stayed IT_Approved until my revoke job ran

Disabling a sponsor changes nothing
#

A minute after sponsor A was disabled, the disabled account was still listed as the agent’s sponsor. Forty-five minutes later it still was, and there was no sponsor event for that agent anywhere in the tenant’s audit log, while later events had already arrived, so it wasn’t just a delay. After 18 hours: still the disabled account, still no sponsor event. The automatic transfer that one Learn page describes didn’t happen.

Microsoft’s own training seems to agree with my lab rather than that page. The knowledge check in the Learn module Establish agent identities with Entra Agent ID asks exactly this question, with “Microsoft Entra ID automatically reassigns sponsorship to the employee’s manager” as one option and “No configured transfer task runs, so the employment event alone doesn’t transfer the sponsorship” as the other.

I’m not the only one who tested this. In early November someone ran almost the same test, with no workflow, and proposed a fix to the Learn pages in pull request #2160 on Microsoft’s docs repository. It was still open when I wrote this. Their results match mine, and they found one more detail: if you restore a deleted sponsor’s account, it’s back as the agent’s sponsor within 30 seconds.

I repeated that in my lab with a fourth sponsor and agent: disable, delete, restore. Same result. The sponsor was back the moment I could read it (under a second), still disabled, and the manager was never added. And there’s a twist: the agent’s audit log has nothing for either step. No Remove user sponsor when the user was deleted, no Add user sponsor when they came back. It looks like deleting a user hides the sponsor link rather than removing it. So if your automation watches sponsor events in the audit log, it misses both. Look at the sponsor list itself.

I’ve added my results, including the missing audit events and the template issue below, as a comment on the pull request. I’m following it, and I’ll update this post when it’s merged or Microsoft answers.

This is the quiet one. The agent has a sponsor, so a quick look says everything is fine. Only when you check whether that sponsor’s account is enabled do you see that nobody is there. That’s why “an active sponsor” was one of the approval criteria in the last post, and why the revoke job checks accountEnabled on every sponsor.

The portal doesn’t help here. The agent’s Owners and sponsors page lists the disabled user as an ordinary sponsor, with no status column and no badge (1 below). The only reason I could tell was the display name I’d given the test user.

Deleting a sponsor hides the link, without a trace #

When sponsor C was deleted, the sponsor disappeared from the agent straight away. The agent was left with zero sponsors, and the agent’s audit log shows no “Remove user sponsor” event, so nothing on the agent itself tells you when or why. The user’s deletion is in the audit log, but you have to know to look there. On the agent’s Owners and sponsors page it just says No owners or sponsors found, with no warning (2).

The Owners and sponsors pages of two agents in my lab. Top, DEMO-A365-Expense-Agent-A: box 1, one sponsor, DEMO-A365 Sponsor A, type Sponsor, object type User, with nothing showing that the account is disabled. Bottom, DEMO-A365-Expense-Agent-C: box 2, No owners or sponsors found, and no warning

The template cancels the transfer
#

Sponsor B is where it got interesting. The workflow ran, sent the manager an email, and then failed. The sponsorship never moved.

The template has three tasks that run in order, and each one has continueOnError set to false. Task 2 emails the agent’s co-sponsors. My agent had only one sponsor, so there were no co-sponsors, and the task failed with “co-sponsor did not exist”. Because the task isn’t allowed to fail, the run stopped, and task 3, the actual transfer, was canceled.

You can see it in the workflow history. The first run is Failed and the second Completed with errors (1), and the Unprocessed column shows that the first run left one task undone (2):

Workflow history, Runs tab, for DEMO-A365 - Transition agent sponsorships when a sponsor leaves. Two runs: 11/23/2026 1:55 PM, Completed with errors, failed users 0/1, failed tasks 1, unprocessed 0; and 11/23/2026 1:53 PM, Failed, failed users 1/1, failed tasks 1, unprocessed 1. Box 1 marks the two statuses, box 2 the Unprocessed column

Open the first run and the tasks tell the story. The transfer is Canceled (1), and the co-sponsor email Failed (2) with “Task failed for 1 sponsored object because one or more co-sponsors were unreachable or co-sponsor did not exist”:

The tasks of the first run, sorted by complete date: Transfer agent sponsorships to manager, Canceled (box 1); Send email to manager about sponsorship changes, Completed; Send email to co-sponsors about sponsor changes, Failed, with the error Task failed for 1 sponsored object because one or more co-sponsors were unreachable or co-sponsor did not exist (box 2)

One more thing to know when you read the history: the Runs tab and the Users tab count differently. The Users tab counts a user as failed if any task failed. It showed Failed: 2 users, even though the second run did the transfer.

The manager gets the email anyway
#

The first task had already run, so the manager got an email, sent at 1:54 PM (1), from the run that canceled the transfer. It says the sponsor “has moved or left and should no longer sponsor their agents” and asks the manager to “identify a new sponsor for each agent” (2). It doesn’t say whether the sponsorship was transferred. A second, identical email came from the second run, which did transfer it.

The email in the manager’s inbox: Agent Sponsor’s job profile changed or sponsor has left the organization, from Microsoft Azure on behalf of bcloud (lifecycleworkflows-noreply@microsoft.com), sent Mon 11/23/2026 1:54 PM (box 1). DEMO-A365 Sponsor B has moved or left and should no longer sponsor their agents. Box 2: Please review the below agents they sponsored and identify a new sponsor for each agent

So from the manager’s side, a canceled transfer and a completed one look the same.

The fix
#

Microsoft’s template as is versus fixed. As is, every task has continueOnError false: 1 email the manager, completed; 2 email the co-sponsors, failed; 3 transfer sponsorships to manager, canceled; result: sponsor unchanged, because with no co-sponsors task 2 fails and stops the run. Fixed, the email tasks have continueOnError true: 1 completed, 2 still failed, 3 completed; result: the manager is sponsor after 19 seconds. Single-sponsor agents are the ones that break: read the run history, where completedWithErrors was the good result and failed the bad one

The fix is small. I created a new version of the workflow with continueOnError set to true on the two email tasks, so a notification can never block the transfer, and ran it again. In the portal the setting is the checkbox Continue workflow execution on error on each task (1):

The task pane Send email to manager about sponsorship changes in the DEMO-A365 workflow, Basics tab: task name, description, To recipient Manager (default), CC recipients 0 users selected, and box 1 on Continue workflow execution on error, checked

This time it finished as completedWithErrors, which here is the good result: the co-sponsor email still failed, but the transfer ran. Nineteen seconds after the run started, the manager was the agent’s sponsor. The agent’s audit log shows Remove user sponsor (1) and Add user sponsor, both initiated by the application AAD Lifecycle Management (2):

Audit Log Details for the transfer on DEMO-A365-Expense-Agent-B: date 11/23/2026 1:55 PM, activity type Remove user sponsor (box 1), category UserManagement, status success; initiated by (actor): type Application, display name AAD Lifecycle Management (box 2)

If you use this template, check it before you rely on it. I’d guess single-sponsor agents are common.

The approval survives the transfer
#

And here’s the reader’s point, in my lab. After the transfer, agent B had a new sponsor, the manager, and was still IT_Approved. The manager never reviewed it. Nobody re-decided anything. The approval simply came along with the agent.

This is what the manager sees on Manage agents in My Account (myaccount.microsoft.com/agents): they’re now the sponsor (1), and the agent is active. Nothing says the agent carries someone else’s approval. Lifecycle Compliance says No Policy (2), even though my lifecycle policy covers this agent. I took the screenshot before the policy had run for the first time; after that it said Compliant, as you’ll see below.

My Account, Manage agents, the details of DEMO-A365-Expense-Agent-B: Active, created Nov 23, 2026; Sponsors superlangbein (box 1); Owners: no owners; Lifecycle Compliance: No Policy (box 2); Blueprint ID and Object ID on the right

The approval survives a sponsor transfer. 1 Before: sponsor B, who reviewed it, and IT_Approved; decision and owner match. 2 After the transfer, done by the leaver workflow in 19 seconds: sponsor is the manager, nobody re-decided, still IT_Approved; inherited approval. 3 After the revoke job, trigger sponsor changed: sponsor is the manager, who must confirm; In_Review, blocked until confirmed. Ownership moved, the decision didn’t: transfer the sponsor, then send the approval back for review. In_Review is still blocked by the policy

My revoke job didn’t catch it either, at first. It checks whether an agent has an active sponsor, and after the transfer it did. Ownership was fine. The problem is that the decision belonged to someone else.

So the transfer is good, and you want it: an agent with an orphaned sponsor is worse. But the transfer should hand the agent to the manager and send the approval back for review.

The design: three layers, one of them yours
#

After the test, the picture got simpler. There are three things that react when a sponsor leaves, and each one watches something different:

The revoke design in layers. The event: a sponsor leaves, leave date set, account disabled or deleted. Three layers react. Watches the person: the lifecycle workflow (leaver) moves sponsorship to the manager and emails people; it runs on the leave date or on demand; result: sponsor becomes the manager. Watches the agent: the Agent ID lifecycle policy checks for too few sponsors (disabled ones count), inactivity and missing reconfirmation; it runs on its own schedule, then a grace period; result: agent disabled. Watches the decision: your revoke job, with five triggers, sets ApprovalStatus and removes access packages; it runs on your schedule, for example every 30 minutes; result: New or In_Review. Everything is enforced at the next token: no token for a disabled agent, and Conditional Access blocks all but IT_Approved. Tokens the agent already holds keep working until they expire. Only the third layer is yours to build: Entra keeps sponsors and agents in order, nothing in Entra changes your approval attribute

The names are close, so to be clear: a lifecycle workflow is started by something happening to a user, and a lifecycle policy regularly checks the agents. They’re the two Keep it true rows at the bottom of the governance map from the last post:

Governance map from the last post. Arrive: A, may people use it, answered by Agent requests in the M365 admin center (maker submits or user asks, admin approves and a template is set); who answers for it, the sponsor in Entra Agent ID. Allow: B, may it get a token, answered by a custom security attribute plus a Conditional Access policy (approver sets the value, next token yes or no); C, what may it reach, answered by an access package in entitlement management (agent or sponsor asks, approved, then expires). Run: is it behaving, agent risk in ID Protection (risk turns high, CA blocks the next token). Keep it true: its person changed, the lifecycle workflow that watches the person and moves sponsorship to the manager when the sponsor leaves or moves; it went stale, the Agent ID lifecycle policy that watches the agent and notifies or disables it when it’s idle or has too few sponsors

  • The lifecycle workflow watches the person. It’s the one from the test: when the sponsor leaves, and if you’ve fixed the template, the sponsorship moves to the manager. The sponsor tasks are covered by the Agent 365 licence (licensing table); other workflow tasks and custom extensions need Entra ID Governance.
  • The Agent ID lifecycle policy watches the agent. It’s in preview, and it checks for too few sponsors (disabled ones count), no activity, or no periodic reconfirmation. It notifies the sponsors, or a fallback recipient when there are none, and after a grace period it disables or deletes the agent (Agent ID lifecycle policies).
  • The revoke job watches the decision. This is the part you build. It’s the only one that changes the attribute.

Conditional Access then does what it always does: at the agent’s next token request, a disabled agent gets nothing, and anything that isn’t IT_Approved is blocked.

Here’s the same design one level down: what starts each layer, the identity it runs as, what it reads and what it writes. All three write to the same object, and only one of them writes the approval:

Low-level design of the three layers. Layer 1, the lifecycle workflow (leaver), watches the person: triggered by the leave date (employeeLeaveDateTime) or run on demand; runs as AAD Lifecycle Management, a Microsoft service; reads the leaver’s manager and the agents they sponsor; writes the sponsors (adds the manager, removes the leaver) and emails the manager and co-sponsors. Warning: with one sponsor, the co-sponsor email fails and cancels the transfer. Layer 2, the Agent ID lifecycle policy (preview), watches the agent: runs on a service schedule, first run 4 hours 20 minutes after creation; runs as Microsoft Security - Entra Agent Lifecycle Policies; reads sponsor count, inactivity and periodic reconfirmation; sends a notification at once and after the grace period sets accountEnabled to false. Warning: a disabled sponsor still counts as a sponsor. Layer 3, your revoke job, watches the decision: runs on your schedule, for example every 30 minutes; runs as a managed identity (in my lab a delegated admin in PowerShell); reads sponsors and whether they’re enabled, sign-in activity, riskyAgents, the attribute audit log for the last approval and the directory audit log for sponsor changes; writes ApprovalStatus New or In_Review and removes access packages with adminRemove. Warning: the attribute permission is tenant-wide, so protect this identity. Least privilege for a managed identity, app-only: CustomSecAttributeAssignment.ReadWrite.All, the catalog role Access package assignment manager, AgentIdentity.ReadWrite.All for reading sponsors, User.Read.All, AuditLog.Read.All, CustomSecAttributeAuditLogs.Read.All and IdentityRiskyAgent.Read.All. All three write to one object, the agent identity in Entra: layer 1 writes sponsors, layer 2 writes accountEnabled, layer 3 writes customSecurityAttributes.AgentGovernance.ApprovalStatus and the access package assignments. That object is read at the next token request: accountEnabled false means no token at all, and Conditional Access blocks every agent except ApprovalStatus IT_Approved. Tokens the agent already holds keep working until they expire. Only layer 3 writes the approval: without your job a manager inherits IT_Approved, and a disabled sponsor goes unnoticed

The lifecycle policy
#

I hoped the lifecycle policy would be the safety net for agents A and C: an agent with no sponsor, or one whose sponsor is gone, should end up disabled even if nobody acts. It turned out to catch only C.

I created a policy for my five test agents: the rule Sponsor must be present with one sponsor (1), and the action Disable Agent ID (2), with my admin account as fallback recipient. Note the wording in the portal: minimum active sponsors. That suggests a disabled sponsor like A’s doesn’t count. It does count, as it turned out.

Learn only describes the portal for this, but there’s also an API in Microsoft Graph beta that isn’t documented on Learn yet. It needs its own permission, LifecyclePolicies-AgentId.ReadWrite.All. I created the policy there, and that taught me something: the API accepts values the portal doesn’t. It took a grace period of 0 days, which the portal flags with “Enter a value of 1 or greater” (3), and a fallback recipient as an object ID, where the portal wants an email address. The policy saved fine through the API, but you couldn’t save it in the portal as it was. I changed it to 1 day and an email address. If you script these, use values the portal would accept, and check the result in the portal.

The policy DEMO-A365 - Minimum one sponsor in the portal, as created through Graph. Box 1: Sponsor must be present, on, Agent ID must have at least the configured number of active sponsors, Minimum active sponsors 1. Policy actions: Delete Agent ID, Disable Agent ID (selected, box 2), Disable Agent ID and delete after specified days. Apply a grace period before taking action is checked, and box 3 shows Grace period (days) 0 with the error Enter a value of 1 or greater

The default inactivity policy is listed in the same place, and it’s off until you turn it on. Its settings match Learn: no activity for 60 days, then a 30-day grace period, then disable, then delete 365 days later.

At first the policy did nothing. An hour after I created it (the screenshot), and still three hours after, its Processing status was Not started (1), and Subjects currently in scope said No subjects found (2).

The policy overview: Scope Specific Agent IDs, Processing status Not started (box 1), Last successful processing a dash; Subjects currently in scope, with columns Object ID, Name, Directory status, Compliance status and Compliance reason, says No subjects found (box 2)

The first evaluation came 4 hours and 20 minutes after I created the policy. All five agents were then in scope, and the result is the surprise of this post:

  • C, with no sponsor at all, was flagged as non-compliant. The notification went out 7 seconds later, and the policy scheduled disable for exactly one grace period later.
  • A, whose only sponsor is a disabled account, was compliant. So was Invoice-Bot, whose sponsor has been disabled since early November.
  • B, now sponsored by the manager, was compliant too. The policy checks that a sponsor exists, not who approved.

So minimum active sponsors doesn’t mean enabled sponsors. A disabled account still counts. That’s the usual way people leave: the account is disabled on the last day and deleted weeks later. Until it’s deleted, the policy sees nothing wrong.

The manager sees the same in My Account. Under Manage agents, Expense-Agent-B is now Compliant (1), where it said No Policy before the first evaluation. HR-Onboarding isn’t in the policy, so its Lifecycle Compliance is empty (2). And Invoice-Bot, whose only sponsor has been disabled for two weeks, is Compliant as well (3):

My Account, Manage agents, for the manager. Top, Agents you sponsor (3): DEMO-A365-Expense-Agent-B, created Nov 23, 2026, Active, Lifecycle Compliance Compliant (box 1); DEMO-A365-Finance-Assistant, Active, Compliant; DEMO-A365-HR-Onboarding, Active, Lifecycle Compliance empty (box 2). Bottom, Agents you own (3): DEMO-A365-Invoice-Bot, created Nov 10, 2026, Active, Compliant (box 3), even though its only sponsor is disabled; DEMO-A365-Finance-Assistant, Compliant; DEMO-A365-HR-Onboarding, empty

If you go looking for this in the audit log, every agent in scope gets an Update service principal event from the app Microsoft Security - Entra Agent Lifecycle Policies. No changed properties are shown.

When I published this post, C’s disable was still scheduled for the end of the grace period. I’ll add what happened here.

Five triggers
#

The job from the last post had four triggers. The test added a fifth:

The revoke job’s five triggers. Agent disabled: accountEnabled is false, for example by the lifecycle policy; approval set to New, access packages removed. No active sponsor: no enabled user sponsor left, disabled or deleted; New, packages removed. Stale: no sign-in for 30 days, from the sign-in activity report; New, packages removed. Risk high: listed as high in riskyAgents, ID Protection preview; New, packages removed. Sponsor changed, new: a sponsor was added or removed after the last classification; In_Review, packages kept. Why the fifth one is softer: someone is still accountable, they just never decided. In_Review blocks the agent until they confirm, but keeps its access packages, so confirming puts it straight back

The first four mean nobody is accountable, or something is wrong, so the agent goes back to New and loses its access packages. The fifth means someone is accountable, but they didn’t make this decision. That’s softer, so it goes to In_Review. The policy from the last post only lets IT_Approved through, so the agent is blocked until the new sponsor confirms it, but its access packages stay, so confirming puts it straight back.

In my lab, agents A and C went to New within minutes, and with the fifth trigger agent B went to In_Review. A second run found nothing left to do.

The custom security attributes of DEMO-A365-Expense-Agent-B after the revoke job: AgentGovernance ApprovalStatus, String, not multi-valued, assigned value In_Review (box 1); AgentGovernance DataSensitivity, General

“After the last classification”
#

To know whether a sponsor changed after the approval, the job needs to know when the approval was set. That’s in the custom security attribute audit log, which is kept apart from the normal directory audit log on purpose. Global Administrator can’t read it; you need Attribute Log Reader (custom security attribute audit logs).

In my lab the account running the job didn’t have that role, got a 403, and the job fell back to “a sponsor changed in the last 30 days”, with a warning. That works, but it has a catch: if someone re-approves the agent within those 30 days, the next run sends it back to review again. Give the job’s identity Attribute Log Reader.

From proof of concept to production
#

For this proof of concept I ran the job as a PowerShell script on my laptop, signed in as an admin. That’s fine for testing, but in production the job belongs in Azure, running as a managed identity. There are two ways to host it, and they behave differently. The diagram shows both, next to the laptop run I used:

Where the revoke job can run. My lab, what I ran: PowerShell on a laptop; sign-in as me, delegated, with the admin roles; runs by hand or on a local schedule; needs nothing in Azure, and stops when the laptop sleeps. Production, scheduled: an Azure Automation runbook; sign-in with a managed identity and app roles; runs on a schedule, for example every 30 minutes; needs an Azure subscription; catches all five triggers. Production, event-driven: a Logic App called from the leaver workflow; sign-in with a managed identity and app roles; runs when the workflow fires, as a custom task; needs Azure plus Entra ID Governance; only sees the leaver. All three make the same Graph calls: list agents and sponsors, check whether the sponsor is enabled, read sponsor changes from the audit log, set ApprovalStatus, remove access packages. Only the sign-in and the trigger change: the event-driven Logic App is faster, but it only sees a sponsor leaving, and it gets the sponsor, not the agents. Keep a scheduled run as the safety net for the other four triggers

  • A scheduled runbook is the same script with a managed identity instead of me. It checks every agent every run, so it catches all five triggers, but only as often as you schedule it.
  • A Logic App from the leaver workflow runs the moment the workflow does, as a custom task extension. It’s faster, but it only knows that a sponsor left, and it receives the user, so it has to find that person’s agents itself. It also needs Entra ID Governance, which the Agent 365 licence doesn’t cover.

I’d start with the schedule, and add the event-driven one only if minutes matter. The Graph calls are the same in all three; only the sign-in and the trigger change.

Keep the job’s identity small
#

The job changes who’s allowed to run, so its identity is privileged, and some of the permissions it needs are broad. Microsoft’s advice is to pick the least privileged permission for each call. For a managed identity (app-only), this is the smallest set I could find on Learn. The tier column comes from AzTier (source on GitHub), a community project that rates Graph permissions by how far an attacker could get with them: Tier 0 means a known path to Global Admin, Tier 1 write access or sensitive reads with no known path, and Tier 2 little security impact. It’s a community rating, not Microsoft’s, but a useful second check.

What it does Least privilege, app-only Tier Note
List agents AgentIdentity.Read.All 2 Covered anyway by ReadWrite.All in the next row
List each agent’s sponsors AgentIdentity.ReadWrite.All 1 Learn lists no read-only permission for this, app-only
Check that sponsors are enabled User.Read.All 2
Set the attribute CustomSecAttributeAssignment.ReadWrite.All 1 ⚠ The only app permission for this, and it covers every attribute set, user and service principal in the tenant
Remove access package assignments Catalog role Access package assignment manager, on the agents’ catalog only – Instead of EntitlementManagement.ReadWrite.All, which is Tier 0: it can open a path to Global Admin. Service principals can hold catalog roles
Sign-in activity, directory audit AuditLog.Read.All 1
When the approval was set CustomSecAttributeAuditLogs.Read.All 1
High-risk agents IdentityRiskyAgent.Read.All 2

Searching AzTier for the agent permissions shows where the line goes. The two blueprint permissions that can add credentials or change a blueprint are Tier 0 (1): with them you can act as the agents built from that blueprint, and from there follow the same path as the Agent ID Administrator role. AgentIdentity.ReadWrite.All, which the job needs for the sponsor list, is Tier 1 (2). AgentIdentity.Read.All is Tier 2 (3). The job needs nothing from the blueprint rows, so keep those permissions away from it.

AzTier search for AgentIdentity, 19 of 782 Microsoft Graph application permissions, sorted by tier. Box 1: AgentIdentityBlueprint.AddRemoveCreds.All and AgentIdentityBlueprint.ReadWrite.All, both Tier 0 with an indirect path. Box 2: AgentIdentity.ReadWrite.All, Tier 1. Box 3: AgentIdentity.Read.All, Tier 2. The other rows are the Create, CreateAsManager, DeleteRestore, EnableDisable and blueprint principal permissions at Tier 1, and the blueprint read permissions at Tier 2. Source: aztier.com

The attribute permission is the one to worry about. AzTier rates it Tier 1, but in this design it decides which agents Conditional Access lets through. With it, the job’s identity could set IT_Approved on any agent, or change any other custom security attribute, including ones your Azure role conditions might rely on. So:

  • Use a managed identity, so there’s no secret to leak.
  • Treat everyone who can edit the runbook as holding that permission. Whoever can change the code, or run code as the identity, can approve agents. Keep that circle small.
  • The job only ever moves agents down. It sets New or In_Review, never IT_Approved. Alert on the attribute audit log if its identity ever sets IT_Approved, and keep approving with a different identity or person.
  • Scope the access package part to one catalog with the catalog role, not the tenant-wide permission. A catalog-scoped identity has to filter by access package, so the job has to list per package (tested below).
  • For delegated runs like my lab, assign Attribute Assignment Administrator at the attribute set scope (AgentGovernance), not the tenant, plus Attribute Log Reader. Note that PIM can’t make roles at attribute set scope eligible, only permanent.

I tested the catalog role from PowerShell on my laptop. In Azure the job would run as a managed identity, which is a service principal under the hood, so I used a temporary app registration (also a service principal) to stand in for it, and signed in as that app. The app had no Graph permissions at all; its token carried no roles. Its only right was Access package assignment manager on the catalog that holds the agents’ access package:

What the app tried Result
Remove an agent’s access package assignment ✅ Allowed. The assignment was gone about 4 minutes later
List assignments and requests for that access package ✅ Allowed
List catalogs ✅ Allowed, but it only sees its own
List all assignments or requests in the tenant ❌ 403
List the access packages in another catalog ❌ 403
Edit the access package ❌ 403

The catalog in my lab is DEMO-A365 Agents (1), and the test ran against the fourth agent from the restore test, DEMO-A365-Expense-Agent-D (2). It got the access package through an admin assignment, and the app took it away again.

The DEMO-A365 Agents catalog in the Microsoft Entra admin center, Identity Governance, Catalogs, DEMO-A365 Agents (box 1), Agents, Agent identities: 7 agent identities found, DEMO-A365-Expense-Agent-C, -B and -A created 11/23/26, DEMO-A365-Expense-Agent-D created 11/24/26 (box 2), and DEMO-A365-Invoice-Bot, DEMO-A365-Finance-Assistant and DEMO-A365-HR-Onboarding created 11/10/26

So it can do what the revoke job needs and nothing else. In particular it can’t edit a package or its policy, which is the path that makes EntitlementManagement.ReadWrite.All Tier 0.

One change was needed. The job listed all assignments in the tenant in one call, and that’s exactly what the catalog role refuses. It now lists the access packages in the catalog and asks for the assignments of each one. Two more things to know if you set this up: a new service principal can’t be given a catalog role straight away (it failed with SubjectNotFound for about a minute), and the catalog role is assigned through roleManagement/entitlementManagement, not through the Entra roles you’d normally use.

The rest of my lab run was still delegated, with broader scopes than the table above. Check the other permissions in your own tenant before you rely on them.

Things to get right
#

  • Fix the leaver template. Turn on Continue workflow execution on error for the email tasks, or agents with one sponsor never transfer.
  • A transfer is not a re-approval. Send the agent back to In_Review when its sponsor changes.
  • Read the sponsor list, and check that each sponsor is enabled. A disabled sponsor stays listed, a deleted one disappears without an event on the agent, and the lifecycle policy counts disabled sponsors as sponsors.
  • Treat the job’s identity as privileged. Least privilege, a catalog role for the access packages, Attribute Log Reader so it knows when the approval was set, and an alert if it ever sets IT_Approved.
  • Revoking isn’t instant. It takes effect at the agent’s next token request.

What I haven’t found an answer to yet
#

Some of what I saw doesn’t match the documentation, and some of it isn’t documented at all. I don’t know yet which of these are documentation gaps, design choices or real faults. This is where my research stands:

What I saw What the docs say Where it stands
No transfer to the manager without a workflow, after disable or delete Manage agent identities says it’s automatic. The Zero Trust Assessment guidance calls it “automatic succession” Same result in an independent test, with a docs fix proposed in PR #2160 (open). The training quiz seems to agree with the lab
The lifecycle policy treats an agent whose only sponsor is disabled as compliant The portal says “minimum active sponsors”. Learn doesn’t say what active means Not documented anywhere I could find. I’ve seen it in one evaluation, on two agents
Microsoft’s leaver template cancels the transfer when an agent has one sponsor The tasks are documented one by one, not how they behave together Not documented. The template’s default for Continue workflow execution on error is off
The run that transferred the sponsor is logged as failure in the audit log – Read the run’s task results instead, not the audit result
The Graph API accepts a 0-day grace period and an object ID as recipient, which the portal rejects The API isn’t on Learn yet (beta) Use values the portal accepts
Restoring a deleted sponsor makes them the sponsor again, still disabled. Neither the delete nor the restore shows up in the agent’s audit log Not documented Found first in PR #2160, reproduced in my lab. The missing audit events are my own finding, now added to the PR

Ignite 2026 ran 17–20 November (week 47), and I haven’t watched every session yet, so some of this may already have been answered there. If you know the answer to any of these, or have a Microsoft source for it, whether it’s a doc or an Ignite session, please tell me and I’ll update the post.

Summary
#

Who acts when a sponsor leaves, for the three cases tested: A, sponsor disabled with no workflow; B, sponsor disabled plus a leaver workflow that transfers to the manager; C, sponsor deleted with no workflow. Leaver workflow (Lifecycle Workflows): A not applicable, no workflow ran; B moved the sponsorship to the manager in 19 seconds, but only with continue on error turned on, since Microsoft’s template as-is cancels the transfer; C not applicable, no workflow ran. Agent ID lifecycle policy, minimum one sponsor: A not flagged, because a disabled sponsor counts as active; B not flagged, the manager is a sponsor; C flagged as non-compliant, notified, with disable scheduled after the grace period. ApprovalStatus, which Entra never touches: IT_Approved, unchanged, in all three. Your revoke job, with five triggers: caught all three; A, sponsor disabled, set to New; B, sponsor changed, set to In_Review; C, no sponsor, set to New. Lifecycle policy: first evaluation 4 hours 20 minutes after creation, then the grace period. A disabled sponsor still counts. Entra handles sponsors, never the approval: only your own job catches every case

When a sponsor leaves, Entra can look after the sponsors: a leaver workflow, if you configure and fix it, moves them to the manager, and the Agent ID lifecycle policy can disable an agent that’s left with no sponsor at all. It doesn’t flag one whose sponsor is only disabled, and nothing in Entra touches your approval. In all three leaver cases, A, B and C, ApprovalStatus stayed IT_Approved until my own job changed it.

And the reader was right: when the transfer works, the exception survives by default. The manager inherits an approval they never made. The fix is a fifth trigger: a sponsor change sends the agent back to In_Review, blocked until the new sponsor confirms.

The lifecycle policy is a slow safety net: its first evaluation took over four hours, the grace period comes on top, and a disabled sponsor still counts as a sponsor. Your revoke job has to look at whether the sponsor is enabled.

Much of this is in preview and moving fast, and I’ve only tested it in my lab. If you’ve seen the automatic transfer from that one Learn page actually happen, I’d like to hear about it.

Links #

What I tested against, and what others found:

Next up: the agents that never got an Agent ID at all, which another reader pointed out are often the ones that most need blocking. They sit outside the attribute scheme entirely, so they need a different answer.

Let’s talk
#

Thanks to everyone who commented on the last post. Two of the comments shaped this one, and the next.

Ping me on LinkedIn or X/Twitter (@salvestad).