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.
1 parent 7c0e0d9 commit 4db6d4aCopy full SHA for 4db6d4a
samples/5-Chats.ps1
@@ -7,4 +7,17 @@ Get-MgChat
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!"
+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