Skip to content

Commit b1b9cec

Browse files
MathijsVerbeeckplamber
authored andcommitted
Enhances 'teams chat list' with user filter. Closes pnp#3774
1 parent 01dcbcb commit b1b9cec

File tree

3 files changed

+175
-188
lines changed

3 files changed

+175
-188
lines changed

docs/docs/cmd/teams/chat/chat-list.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# teams chat list
22

3-
Lists all Microsoft Teams chat conversations for the current user.
3+
Lists all Microsoft Teams chat conversations for the current or a specific user.
44

55
## Usage
66

@@ -10,9 +10,15 @@ m365 teams chat list [options]
1010

1111
## Options
1212

13-
`-t, --type [chatType]`
13+
`-t, --type [type]`
1414
: The chat type to optionally filter chat conversations by type. The value can be `oneOnOne`, `group` or `meeting`.
1515

16+
`--userId [userId]`
17+
: ID of the user. Has to be specified when using application permissions. Specify either `userId` or `userName`, but not both.
18+
19+
`--userName [userName]`
20+
: UPN of the user. Has to be specified when using application permissions. Specify either `userId` or `userName`, but not both.
21+
1622
--8<-- "docs/cmd/_global.md"
1723

1824
## Examples
@@ -23,10 +29,16 @@ List all the Microsoft Teams chat conversations of the current user.
2329
m365 teams chat list
2430
```
2531

26-
List only the one on one Microsoft Teams chat conversations.
32+
List only the one on one Microsoft Teams chat conversations of a specific user retrieved by id.
33+
34+
```sh
35+
m365 teams chat list --userId e6296ed0-4b7d-4ace-aed4-f6b7371ce060 --type oneOnOne
36+
```
37+
38+
List only the group Microsoft Teams chat conversations of a specific user retrieved by mail
2739

2840
```sh
29-
m365 teams chat list --type oneOnOne
41+
m365 teams chat list --userName '[email protected]' --type group
3042
```
3143

3244
## Response

0 commit comments

Comments
 (0)