From d99ece69fd1b0d694d94a242d34d1c773149b32b Mon Sep 17 00:00:00 2001 From: edle Date: Wed, 18 Mar 2026 12:37:05 -0400 Subject: [PATCH 1/2] changes --- .../AgentNotification.cs | 42 +++++++++++++++++++ .../Constants.cs | 15 +++++++ 2 files changed, 57 insertions(+) diff --git a/src/Notification/Microsoft.Agents.A365.Notifications/AgentNotification.cs b/src/Notification/Microsoft.Agents.A365.Notifications/AgentNotification.cs index 814aed84..5612cb21 100644 --- a/src/Notification/Microsoft.Agents.A365.Notifications/AgentNotification.cs +++ b/src/Notification/Microsoft.Agents.A365.Notifications/AgentNotification.cs @@ -159,6 +159,9 @@ private static bool IsValidLifecycleEvent(string lifecycleEvent) Events.AgenticUserIdentityCreated => true, Events.AgenticUserWorkloadOnboardingUpdated => true, Events.AgenticUserDeleted => true, + Events.AgenticUserUndeleted => true, + Events.AgenticUserIdentityUpdated => true, + Events.AgenticUserManagerUpdated => true, _ => false, }; } @@ -287,6 +290,45 @@ public static void OnAgenticUserDeletedNotification(this AgentApplication app, A a365.OnLifecycleNotification(Events.AgenticUserDeleted, routeHandler, rank, autoSignInHandlers); }); + /// + /// Registers a handler for agentic user un-deleted lifecycle notifications. + /// + /// The agent application to extend. + /// The handler to invoke when a notification is received. + /// The route priority rank (default is 32767). + /// Optional array of auto sign-in handlers. + public static void OnAgenticUserUndeletedNotification(this AgentApplication app, AgentNotificationHandler routeHandler, ushort rank = 32767, string[] autoSignInHandlers = null!) => + app.RegisterExtension(new AgentNotification(app), a365 => + { + a365.OnLifecycleNotification(Events.AgenticUserUndeleted, routeHandler, rank, autoSignInHandlers); + }); + + /// + /// Registers a handler for agentic user identity updated lifecycle notifications. + /// + /// The agent application to extend. + /// The handler to invoke when a notification is received. + /// The route priority rank (default is 32767). + /// Optional array of auto sign-in handlers. + public static void OnAgenticUserIdentityUpdatedNotification(this AgentApplication app, AgentNotificationHandler routeHandler, ushort rank = 32767, string[] autoSignInHandlers = null!) => + app.RegisterExtension(new AgentNotification(app), a365 => + { + a365.OnLifecycleNotification(Events.AgenticUserIdentityUpdated, routeHandler, rank, autoSignInHandlers); + }); + + /// + /// Registers a handler for agentic user manager updated lifecycle notifications. + /// + /// The agent application to extend. + /// The handler to invoke when a notification is received. + /// The route priority rank (default is 32767). + /// Optional array of auto sign-in handlers. + public static void OnAgenticUserManagerUpdatedNotification(this AgentApplication app, AgentNotificationHandler routeHandler, ushort rank = 32767, string[] autoSignInHandlers = null!) => + app.RegisterExtension(new AgentNotification(app), a365 => + { + a365.OnLifecycleNotification(Events.AgenticUserManagerUpdated, routeHandler, rank, autoSignInHandlers); + }); + /// /// Creates a reply Activity containing an entity populated with the provided HTML body. /// diff --git a/src/Notification/Microsoft.Agents.A365.Notifications/Constants.cs b/src/Notification/Microsoft.Agents.A365.Notifications/Constants.cs index 98204251..c8d75f1d 100644 --- a/src/Notification/Microsoft.Agents.A365.Notifications/Constants.cs +++ b/src/Notification/Microsoft.Agents.A365.Notifications/Constants.cs @@ -58,5 +58,20 @@ public class Events /// The event name for agentic user deletion /// public const string AgenticUserDeleted = "agenticUserDeleted"; + + /// + /// The event name for agentic user undeletion. + /// + public const string AgenticUserUndeleted = "agenticUserUndeleted"; + + /// + /// The event name for agentic user identity update + /// + public const string AgenticUserIdentityUpdated = "agenticUserIdentityUpdated"; + + /// + /// The event name for agentic user manager update + /// + public const string AgenticUserManagerUpdated = "agenticUserManagerUpdated"; } } From 951ed5c787b8c12eb0bb659b9fafc851e56cc1fb Mon Sep 17 00:00:00 2001 From: edle Date: Thu, 19 Mar 2026 17:32:57 -0400 Subject: [PATCH 2/2] Taking copilot suggestion --- .../Microsoft.Agents.A365.Notifications/AgentNotification.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Notification/Microsoft.Agents.A365.Notifications/AgentNotification.cs b/src/Notification/Microsoft.Agents.A365.Notifications/AgentNotification.cs index 5612cb21..10aa8dcc 100644 --- a/src/Notification/Microsoft.Agents.A365.Notifications/AgentNotification.cs +++ b/src/Notification/Microsoft.Agents.A365.Notifications/AgentNotification.cs @@ -291,7 +291,7 @@ public static void OnAgenticUserDeletedNotification(this AgentApplication app, A }); /// - /// Registers a handler for agentic user un-deleted lifecycle notifications. + /// Registers a handler for agentic user undeleted lifecycle notifications. /// /// The agent application to extend. /// The handler to invoke when a notification is received.