Forum Discussion

dmarquesgn's avatar
dmarquesgn
Iron Contributor
Mar 17, 2023

Get Teams chat ID

Hi,

I'm developing some alarmistic in Powershell, which to this day, sends the alerts over email.

But I would like to send the alarmistic also to a Teams chat (not a group). I've found a script that can send over the alerts to a Teams chat, but requires the chat id.

I have found a way to get a Teams Group ID (using powershell comand Get-Team -DisplayName "Groupname"), but don't know how to get the ID for a chat.

Can anyone help me to understand how can I get the chat ID?
Thanks

  • You have to connect like this

    Connect-MgGraph -Scopes "User.Read.All", "Group.ReadWrite.All,Chat.Read,Chat.ReadWrite,ChatMember.ReadWrite,Chat.ReadBasic"

Resources