I am running into an issue integrating Teams in SCOM 2022.
I followed the Microsoft documentation. Created the app registration in AAD, Granted the delegated permissions ChannelMessage.Send and User.read, set allow public authentication to yes, and finally created a notification channel, subscriber and subscription using an account I assigned a Teams license to. The same account is also setup as an administrator for SCOM and the Management server. Everytime I test the notification I get the following error in the Event Viewer for Operation Manager. Any help would be greatly appreciated.
The callback method DeliverDataToModule failed with exception "Object reference not set to an instance of an object." in the module Microsoft.EnterpriseManagement.HealthService.Modules.Notification.Teams.TeamsNotificationTransportModule.
Workflow: Subscription9cc8cd53_198c_4204_a855_509d8bebe21d
Instance: Alert Notification Subscription Server
Instance ID: {E07E3FAB-53BC-BC14-1634-5A6E949F9230}
Management Group: XXXXXXX
Full Exception Text:
Microsoft.EnterpriseManagement.HealthService.ModuleException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.EnterpriseManagement.HealthService.Modules.Notification.Teams.Content.TeamsNotificationTransport.Send(TeamsNotification notification)
at Microsoft.EnterpriseManagement.HealthService.Modules.Notification.NotificationTransportModuleBase3.OnDataItem(DataItemBase dataItem, DataItemAcknowledgementCallback acknowledgedCallback, Object acknowledgedState, DataItemProcessingCompleteCallback completionCallback, Object completionState) --- End of inner exception stack trace --- at Microsoft.EnterpriseManagement.HealthService.Modules.Instrumentation.InstrumentedModuleBase
1.HandleFatalException(ITraceScope traceScope, Exception error)
at Microsoft.EnterpriseManagement.HealthService.Modules.Notification.NotificationTransportModuleBase3.OnDataItem(DataItemBase dataItem, DataItemAcknowledgementCallback acknowledgedCallback, Object acknowledgedState, DataItemProcessingCompleteCallback completionCallback, Object completionState) at Microsoft.EnterpriseManagement.HealthService.Internal.InputPortCallbacks.InputStreamAcknowledgedCallbackHandler
1.InputPortCallbackImplementation(DataItemBase[] dataItems, Boolean isBatchLogicalSet, DataItemAcknowledgementCallback acknowledgementCallback, DataItemProcessingCompleteCallback completionCallback)
at Microsoft.EnterpriseManagement.HealthService.Internal.ModuleContainer`1.Microsoft.EnterpriseManagement.HealthService.Internal.IModuleContainer.DeliverDataToModule(UInt32 inputPortNumber, DataItemBase[] dataItems, Boolean isBatchLogicalSet, DataItemAcknowledgementCallback acknowledgementCallback, DataItemProcessingCompleteCallback completionCallback)
at Microsoft.EnterpriseManagement.HealthService.Internal.ManagedHostHelper.Microsoft.EnterpriseManagement.HealthService.Internal.IManagedHostHelper.DeliverBatchedDataToModule(UInt32 inputPortNumber, Object moduleInputReference, DataItemBase[] dataItems, UInt32 dataItemCount, Boolean isBatchLogicalSet, Object completionReference)