question

ChristopherJacobsen-9097 avatar image
0 Votes"
ChristopherJacobsen-9097 asked JimmyYang-MSFT edited

Issue integrating Teams with SCOM 2022

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.NotificationTransportModuleBase`3.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.NotificationTransportModuleBase`3.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)

msc-operations-manager
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

StoyanChalakov avatar image
1 Vote"
StoyanChalakov answered

Hi @ChristopherJacobsen-9097,

Since the whole integration is pretty new, there is almost no helpful troubleshooting information.
Since the exception is generated by the "Alert Notification Subscription Server" Instance I would assume that there is something wrong with the subscrition ""

Could you please run this and check the output:

 Get-SCOMNotificationSubscription -Name Subscription9cc8cd53_198c_4204_a855_509d8bebe21d

Can you please check for relevaant events on your management servers, especially those running the alert notification subscription workflows (part of the respective RP).
Another option would be to open a case at MS...do you have that option?


(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

Regards
Stoyan Chalakov


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ChristopherJacobsen-9097 avatar image
1 Vote"
ChristopherJacobsen-9097 answered StoyanChalakov commented

I don't see anything out of the ordinary with the subscription, I will try removing the the channel, notification and subscription and recreate them to see if that resolves the error. I am not finding any other relevant information in the event viewer. If recreating the subscription doesn't resolve the issue, I do have the option to open a case with Microsoft.

Configuration : Microsoft.EnterpriseManagement.Administration.AlertChangedSubscriptionConfiguration
ManagementGroup : XXXXXXXXXX
Name : Subscription9cc8cd53_198c_4204_a855_509d8bebe21d
DisplayName : Information - Test Teams - Alert on Test Event 100
Description : This is a test alert fired by event ID 100:
Event Description:
This is a Test event 100
Actions : {TeamsAction_16f316dc_ee83_4558_8605_3d9aea2aed29}
ToRecipients : {Testing Teams Integration}
CcRecipients : {}
BccRecipients : {}
Enabled : True
Id : a84e2114-1ede-7689-eda3-8403649a5ecd
ManagementGroupId : 7936cfcb-a52f-f1bd-c100-415c57a41838

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hey,

this sounds like plan. I would very much appreciate it if you update thhe thread with the resolution.
Many thnaks in advance for that!

Cheers,
Stoyan

0 Votes 0 ·