Link a ticket to a Microsoft Teams channel
Link the ticket to a standard Teams channel, by channelId or by the names of its team and channel (teamName and channelName, matched ignoring case). A link puts the ticket in front of the people in that channel, so it is made when someone asked for it, never as a fallback after an unanswered email. Primo posts a card naming the ticket there, which opens the thread: its replies become public comments on the ticket. A ticket holds one link: linking again replaces it, a Slack link made with linkTicketToSlack included, and the previous thread gets a last message. Refused when ticket links are not open for the company (403 TeamsTicketLinksDisabledError), no Microsoft 365 tenant is connected (409 TeamsNotConnectedError), the ticket was raised from Slack or Teams and keeps its thread (409 ChatSourcedTicketLinkLockedError), the channel is used to raise tickets (409 TeamsIntakeChannelLinkRefusedError), no channel of the tenant carries that id, or none or more than one carries those names (422 TeamsLinkTargetUnavailableError), Microsoft keeps Primo out of the channel, a private one included (422 TeamsChannelLinkRefusedError), or Microsoft refuses the Primo app in the team that holds the channel (422 TeamsAppNotAllowedError: add the app to that team, or an admin reconnects Teams). Answers the link with its status; getTicket returns it too. To remove it, use unlinkTicketFromTeams.