New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance teams chat list command to list chats for a specific user #3774
Comments
Hi @KbWorks thank you for your suggestion. |
@KbWorks could you give us some more info? |
We do have a command for listing chats: https://pnp.github.io/cli-microsoft365/cmd/teams/chat/chat-list/ It would be better to update that one with the possibility to call it with app only credentials. |
@martinlingstuyl what would be needed to support app-only in the existing command? |
The chat list command currently uses the /chats endpoint. There is another variant of the endpoint. We would need to allow passing in a userId as an option. GET /me/chats
GET /users/{user-id | user-principal-name}/chats More info: https://learn.microsoft.com/en-us/graph/api/chat-list?view=graph-rest-1.0&tabs=http |
What about:
|
To simplify validation and be consistent with other commands, I suggest we split it into |
Based on the discussion, I updated the specs @KbWorks. |
Looks good. Let's open it up. |
I could work on this one |
Cool, all yours @MathijsVerbeeck! |
New specs
Based on the comments, the following specs emerged:
Enhance the
teams chat list
command to be able to query a list of chats for a specified user. (Using app only permissions)--userId [userId]
userName
oruserId
but not both.--userName [userName]
userName
oruserId
but not both.Requested Specs for reference
Usage
m365 teams user chat list
Description
Get all chats of a user using apponly credentials
Options
Options would be
-query or-filter
-type oneOnOne, group, meeting
-top
Examples
m365 teams user chat list userprincipalmail of id.
Additional Info
No response
The text was updated successfully, but these errors were encountered: