Skip to content

New command: teams chat member add #4898

Description

@Aadit-Ambadkar

Usage

m365 teams chat member add

Description

Adds a member to a Microsoft Teams chat conversation.

Options

Option Description
-i, --chatId <chatId> The ID of the chat conversation.
--userId [userId] The ID of the user. Specify either userId or userName but not both.
--userName [userName] User's UPN (user principal name, e.g. johndoe@example.com). Specify either userId or userName but not both.
--role [role] The role for the user to add. Valid values are: owner, guest. Defaults to owner.
--visibleHistoryStartDateTime [visibleHistoryStartDateTime] Include chat history until a certain point in time. Specify either visibleHistoryStartDateTime, includeAllHistory, or neither.
--includeAllHistory Include all chat history. Specify either visibleHistoryStartDateTime, includeAllHistory, or neither.

Examples

Add a member by ID to a Teams chat without sharing any chat history.

m365 teams chat member add --chatId 19:8b081ef6-4792-4def-b2c9-c363a1bf41d5_5031bb31-22c0-4f6f-9f73-91d34ab2b32d@unq.gbl.spaces --userId bd94e214-7852-48b0-a326-5a34b2a02183

Add a member by UPN to a Teams chat and share chat history until a specific point in time.

m365 teams chat member add --chatId 19:8b081ef6-4792-4def-b2c9-c363a1bf41d5_5031bb31-22c0-4f6f-9f73-91d34ab2b32d@unq.gbl.spaces --userName john.doe@contoso.com --visibleHistoryStartDateTime 2023-05-03T12:00:00Z

Add a guest member by UPN to a Teams chat and share all chat history.

m365 teams chat member add --chatId 19:8b081ef6-4792-4def-b2c9-c363a1bf41d5_5031bb31-22c0-4f6f-9f73-91d34ab2b32d@unq.gbl.spaces --userName nelson.wilke@fabrikam.com --role guest --includeAllHistory

Remarks

We should give an extra explanation for the option role. Value owner is only used for internal users, guest is used for guest users.

Additional Info

https://learn.microsoft.com/en-us/graph/api/chat-post-members

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions