Unable to post incidents in Microsoft Teams

Use this information to solve the problem when you cannot post incidents to the specified channels in Microsoft Teams.

Problem

You cannot post incidents to the specified channel in Microsoft Teams when you haven't talked to the bot before.

Symptom

You may see logs in $ZCHATOPS_HOME/logs/nohup.out as below:
[ERROR] The cached MS Teams service URL is empty! You must talk with your bot in your MS Teams client first to cache the service URL.

Cause

Posting incidents to the specified channel in Microsoft Teams is sending a proactive message. The service URL is required for this action. The only way to get the service URL of the specified channel is to talk with the bot in it at least once.

Solution

Talk to the bot in your channel first and post incidents again.