Skip to content

How to define ChannelRules in Microsoft Teams channels? #223

@drenand

Description

@drenand

Good morning.
I would appreciate some help setting up Channel Rules for Microsoft Teams channels.

Thank you very much for any help offered!

Expected Behavior

I want to be able to configure Channel Rules for Poshbot on a Microsoft Teams backend.

Current Behavior

The documentation only shows how to configure channel rules for Slack, but contains no examples for Microsoft Teams.

Specifically, in the "Channel" field on the ChannelRules hashtable, what should I put in this field when using Microsoft Teams?
For Slack the example is pretty straightforward (example: 'general'), but for Teams this doesn't seem to be enough.

On my Teams, my channel is called 'General', and is under a team called 'DevOps'.

In this "Channel" field, under ChannelRules, I have tried, with no success:

  • The ID you get when clicking "get link to channel" (just the decoded string ending in "...thread.skype")
  • The ID you get when clicking "get link to channel" (the full string)
  • The ID you get when clicking "get link to team" (just the decoded string ending in "...thread.skype")
  • The ID you get when clicking "get link to team" (the full string)
  • The Sharepoint object ID of this General channel
  • All possible variations of "DevOps.General", "DevOps_General", "DevOps>General", "General", "DevOps"...

If I have ChannelRules enabled and issue a command such as !about, every single time I get this response from PoshBot:
"Sorry :( PoshBot has been configured to not allow that command in this channel".
If I remove the ChannelRules, the commands run fine, so the remaining configurations seem to be properly done.

Possible Solution

I have no idea what else I should be doing, maybe it's just not possible to issue ChannelRules on Microsoft Teams?

Steps to Reproduce (for bugs)

  1. Setup Poshbot with Microsoft Teams backend.
  2. Test issuing commands on a channel, confirm that PoshBot is working.
  3. Try setting up ChannelRules for that channel, PoshBot will refuse to answer every single time because the "Channel" field is not filled correctly.

Context

I am deploying a Teams Bot to allow users to run some select powershell commands, in order to simplify some work from the DevOps team.

Your Environment

Windows 10 laptop (localhost)
Microsoft Teams (cloud version)
PoshBot v0.13.0
Powershell v5.1.18362.752

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions