We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7c0e0d9 + fa126c5 commit 8f30436Copy full SHA for 8f30436
samples/5-Chats.ps1
samples/5-Teams.ps1
@@ -0,0 +1,23 @@
1
+# Teams Chat snippets
2
+
3
+# Get list of 1:1 chats
4
+Get-MgChat
5
6
+# Get Messages from Chat
7
+Get-MgChatMessage -chatId $chatId
8
9
+# Send a message in that 1:1 chat
10
+New-MgChatMessage -chatId $chatId -BodyContent "Hi from VSCode again!"
11
12
+# Mention a user in a channel message.
13
+$UserToMention = Get-MGUser -UserId $userUPN
14
15
+New-MgTeamChannelMessage -ChannelId $ChannelId -TeamId $TeamId `
16
+ -BodyContentType "html" `
17
+ -BodyContent "Welcome to the channel! <at id='0'>$($UserToMention.DisplayName)</at>" `
18
+ -Mentions @( `
19
+ @{ `
20
+ id = 0; `
21
+ mentionText = $UserToMention.DisplayName; `
22
+ mentioned = @{user = $UserToMention } `
23
+ })
0 commit comments