Sending Instant Messages via GraphWorX Commanding

After you create a MSTeams configuration in Workbench, you can access the Teams instant message (IM) command in Data Browser in that MSTeams configuration folder under Alarms and Notifications > Alert Notifications > MSTeamsConfigurations.

You can use this command with the desired parameters to send Teams IM via GraphWorX™. The command can contain the following parameters.

Required parameters

Parameter

Value Type

Description

UserId

string

The user's principal name (usually an email address) or the Azure ID of the person you want to send IM to.

Message

string

The desired message to be sent.

Optional parameters

Parameter

Value Type

Description

Importance

int32

Level of importance.

  • 0 = normal
  • 1 = important
  • 2 = urgent

Type

int32

Type of message.

  • 0 = plain text
  • 1 = HTML format

Topic

string

Topic of the message. Used for group messages.

VerifyUsers

bool

Used mainly for group messages. When true, it verifies that all intended users are in the group chat and attempts to add back any users that have been removed or have left the group chat.

The record of sent IMs is added to ALERT_RestIMLog in the database. You can archive these logs using the archiving settings available in Workbench in Project Explorer under Alarms and Notifications > Alert Notifications > General Settings.

Notes:

  • There are certain limitations that Teams sets on a group chat. For example:

    • If you have more than 20 people in a chat, the following chat features are turned off:

      • Outlook automatic replies
      • Teams status messages
      • Typing indicator
      • Video and audio calling
      • Sharing
      • Read receipts
    • The Set Delivery Options button is also removed when private group chats contain more than 20 members.
    • Only 200 members at a time can be added to a group chat.
  • If a member of a group chat removes themselves from the group, they no longer receive notifications in that group chat. To verify if a user left the group and add them back, use the VerifyUsers parameter.
  • If the group chat initiator (the email used in AlertRest teams) is removed from a group chat by another member, AlertRest creates a new group when the same set of people needs to be notified again.
  • Teams Graph API calls have API rate limits. Exceeding this limit causes throttling. This means that you should not use Teams for high frequency alerts. If the API call rates are exceeded, these are logged as Service Exception failures in traces, as well as the Alert logs.