Skip to content

Office365groupsmailClient

Attributes

TRIGGER_OPERATIONS module-attribute

TRIGGER_OPERATIONS: Dict[str, Dict[str, Any]] = {'OnNewEmailInGroup': {'operation_id': 'OnNewEmailInGroup', 'path': '/{connectionId}/trigger/v1.0/groups/{groupId}/conversations', 'method': 'get', 'required_parameters': ['groupId'], 'callback_payload_type': 'OnNewEmailInGroupResponse'}}

Classes

ListConversationsResponse dataclass

ListConversationsResponse(next_link: Optional[str] = None, value: Optional[List[Conversation]] = None)

Response for List the conversations of a group

Attributes

next_link: Optional[str] = field(default=None, metadata={'wire_name': '@odata.nextLink'})

Link to get next page of results

CreateConversationResponse dataclass

CreateConversationResponse(context: Optional[str] = None, id: Optional[str] = None, threads_odata_context: Optional[str] = None, threads: Optional[List[Dict[str, Any]]] = None)

Response for Create a new conversation in a group

Attributes

context class-attribute instance-attribute
context: Optional[str] = field(default=None, metadata={'wire_name': '@odata.context'})

The @odata.context link.

id class-attribute instance-attribute
id: Optional[str] = None

New Conversation ID.

threads_odata_context class-attribute instance-attribute
threads_odata_context: Optional[str] = field(default=None, metadata={'wire_name': 'threads@odata.context'})

The threads@odata.context link.

threads class-attribute instance-attribute
threads: Optional[List[Dict[str, Any]]] = None

Created conversation thread.

Conversation dataclass

Conversation(id: Optional[str] = None, topic: Optional[str] = None, has_attachments: Optional[bool] = None, last_delivered_date_time: Optional[str] = None, unique_senders: Optional[List[str]] = None, preview: Optional[str] = None, threads: Optional[List[ConversationThread]] = None)

Response for Get a group conversation

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

The conversations's unique identifier.

topic class-attribute instance-attribute
topic: Optional[str] = None

The topic of the conversation.

has_attachments class-attribute instance-attribute
has_attachments: Optional[bool] = field(default=None, metadata={'wire_name': 'hasAttachments'})

Indicates whether any of the posts within this Conversation has at least one attachment.

last_delivered_date_time class-attribute instance-attribute
last_delivered_date_time: Optional[str] = field(default=None, metadata={'wire_name': 'lastDeliveredDateTime'})

The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.

unique_senders class-attribute instance-attribute
unique_senders: Optional[List[str]] = field(default=None, metadata={'wire_name': 'uniqueSenders'})

All the users that sent a message to this Conversation.

preview class-attribute instance-attribute
preview: Optional[str] = None

A short summary from the body of the latest post in this Conversation.

ListConversationThreadsResponse dataclass

ListConversationThreadsResponse(next_link: Optional[str] = None, context: Optional[str] = None, value: Optional[List[ConversationThread]] = None)

Response for List the conversation threads of a conversation

Attributes

next_link: Optional[str] = field(default=None, metadata={'wire_name': '@odata.nextLink'})

Link to get next page of results

context class-attribute instance-attribute
context: Optional[str] = field(default=None, metadata={'wire_name': '@odata.context'})

The Odata.context link.

NewConversationThreadResponse dataclass

NewConversationThreadResponse(context: Optional[str] = None, id: Optional[str] = None)

Response for Create a conversation thread

Attributes

context class-attribute instance-attribute
context: Optional[str] = field(default=None, metadata={'wire_name': '@odata.context'})

The @odata.context link.

id class-attribute instance-attribute
id: Optional[str] = None

New conversation thread ID.

ListGroupThreadsResponse dataclass

ListGroupThreadsResponse(next_link: Optional[str] = None, value: Optional[List[ConversationThread]] = None)

Response for List the threads of a group

Attributes

next_link: Optional[str] = field(default=None, metadata={'wire_name': '@odata.nextLink'})

Link to get next page of results

ConversationThread dataclass

ConversationThread(id: Optional[str] = None, topic: Optional[str] = None, has_attachments: Optional[bool] = None, last_delivered_date_time: Optional[str] = None, unique_senders: Optional[List[str]] = None, preview: Optional[str] = None, is_locked: Optional[bool] = None, to_recipients: Optional[List[EmailAddress]] = None, cc_recipients: Optional[List[EmailAddress]] = None, posts: Optional[List[Post]] = None)

Response for Get a conversation thread

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

The conversation thread's unique identifier.

topic class-attribute instance-attribute
topic: Optional[str] = None

The topic of the conversation.

has_attachments class-attribute instance-attribute
has_attachments: Optional[bool] = field(default=None, metadata={'wire_name': 'hasAttachments'})

Indicates whether any of the posts within this Conversation has at least one attachment.

last_delivered_date_time class-attribute instance-attribute
last_delivered_date_time: Optional[str] = field(default=None, metadata={'wire_name': 'lastDeliveredDateTime'})

The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.

unique_senders class-attribute instance-attribute
unique_senders: Optional[List[str]] = field(default=None, metadata={'wire_name': 'uniqueSenders'})

All the users that sent a message to this Conversation.

preview class-attribute instance-attribute
preview: Optional[str] = None

A short summary from the body of the latest post in this Conversation.

is_locked class-attribute instance-attribute
is_locked: Optional[bool] = field(default=None, metadata={'wire_name': 'isLocked'})

Indicates if the thread is locked.

to_recipients class-attribute instance-attribute
to_recipients: Optional[List[EmailAddress]] = field(default=None, metadata={'wire_name': 'toRecipients'})

The To: recipients for the thread.

cc_recipients class-attribute instance-attribute
cc_recipients: Optional[List[EmailAddress]] = field(default=None, metadata={'wire_name': 'ccRecipients'})

The Cc: recipients for the thread.

ListThreadPostsResponse dataclass

ListThreadPostsResponse(next_link: Optional[str] = None, context: Optional[str] = None, value: Optional[List[Post]] = None)

Response for List the posts of a conversation thread

Attributes

next_link: Optional[str] = field(default=None, metadata={'wire_name': '@odata.nextLink'})

Link to get next page of results

context class-attribute instance-attribute
context: Optional[str] = field(default=None, metadata={'wire_name': '@odata.context'})

The @odata.context link.

value class-attribute instance-attribute
value: Optional[List[Post]] = None

Array containing the posts in the specified thread.

Post dataclass

Post(id: Optional[str] = None, created_date_time: Optional[str] = None, last_modified_date_time: Optional[str] = None, change_key: Optional[str] = None, conversation_id: Optional[str] = None, conversation_thread_id: Optional[str] = None, categories: Optional[List[str]] = None, received_date_time: Optional[str] = None, has_attachments: Optional[bool] = None, new_participants: Optional[List[EmailAddress]] = None, body: Optional[ItemBody] = None, from_: Optional[EmailAddress] = None, sender: Optional[EmailAddress] = None, attachments: Optional[List[Attachment]] = None)

Response for Get a thread post

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

The post's unique identifier.

change_key class-attribute instance-attribute
change_key: Optional[str] = field(default=None, metadata={'wire_name': 'changeKey'})

Identifies the version of the post.

conversation_id class-attribute instance-attribute
conversation_id: Optional[str] = field(default=None, metadata={'wire_name': 'conversationId'})

Unique ID of the conversation the post belongs to.

conversation_thread_id class-attribute instance-attribute
conversation_thread_id: Optional[str] = field(default=None, metadata={'wire_name': 'conversationThreadId'})

Unique ID of the conversation thread the post belongs to.

categories class-attribute instance-attribute
categories: Optional[List[str]] = None

The categories associated with the post.

received_date_time class-attribute instance-attribute
received_date_time: Optional[str] = field(default=None, metadata={'wire_name': 'receivedDateTime'})

Post received timestamp.

has_attachments class-attribute instance-attribute
has_attachments: Optional[bool] = field(default=None, metadata={'wire_name': 'hasAttachments'})

Indicates whether the post has at least one attachment.

new_participants class-attribute instance-attribute
new_participants: Optional[List[EmailAddress]] = field(default=None, metadata={'wire_name': 'newParticipants'})

Conversation participants that were added to the thread as part of this post.

GetAttachmentsResponse dataclass

GetAttachmentsResponse(next_link: Optional[str] = None, context: Optional[str] = None, value: Optional[List[Attachment]] = None)

Response for List the attachments of a post

Attributes

next_link: Optional[str] = field(default=None, metadata={'wire_name': '@odata.nextLink'})

Link to get next page of results

context class-attribute instance-attribute
context: Optional[str] = field(default=None, metadata={'wire_name': '@odata.context'})

The @odata.context link.

value class-attribute instance-attribute
value: Optional[List[Attachment]] = None

Array containing the attachments of the post.

OnNewEmailInGroupResponse dataclass

OnNewEmailInGroupResponse(value: Optional[List[ConversationTriggerResponse]] = None)

Response for When a new email arrives to a group

Attributes

value class-attribute instance-attribute
value: Optional[List[ConversationTriggerResponse]] = None

Response of the trigger.

ObjectWithoutType dataclass

ObjectWithoutType(additional_properties: Dict[str, Any] = dict())

Response for Send an HTTP request

Attributes

additional_properties class-attribute instance-attribute
additional_properties: Dict[str, Any] = field(default_factory=dict)

Dynamic properties determined at runtime (similar to .NET [JsonExtensionData])

ListGroupsResponse dataclass

ListGroupsResponse(value: Optional[List[Dict[str, Any]]] = None)

Response for List user groups

Attributes

value class-attribute instance-attribute
value: Optional[List[Dict[str, Any]]] = None

Array with the groups the user is part of.

Attachment dataclass

Attachment(id: Optional[str] = None, name: Optional[str] = None, content_type: Optional[str] = None, size: Optional[int] = None, content_bytes: Optional[str] = None)

Definition: Attachment

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

Id of the attachment.

name class-attribute instance-attribute
name: Optional[str] = None

Name of attachment.

content_type class-attribute instance-attribute
content_type: Optional[str] = field(default=None, metadata={'wire_name': 'contentType'})

Content type of attachment.

size class-attribute instance-attribute
size: Optional[int] = None

Size of attachment.

content_bytes class-attribute instance-attribute
content_bytes: Optional[str] = field(default=None, metadata={'wire_name': 'contentBytes'})

Content of attachment.

EmailAddress dataclass

EmailAddress(email_address: Optional[Dict[str, Any]] = None)

Definition: EmailAddress

Attributes

email_address class-attribute instance-attribute
email_address: Optional[Dict[str, Any]] = field(default=None, metadata={'wire_name': 'emailAddress'})

Represents information about a user in the sending or receiving end of an event, message or group post.

ItemBody dataclass

ItemBody(content_type: Optional[str] = None, content: Optional[str] = None)

Definition: ItemBody

Attributes

content_type class-attribute instance-attribute
content_type: Optional[str] = field(default=None, metadata={'wire_name': 'contentType'})

Content type of the body.

content class-attribute instance-attribute
content: Optional[str] = None

Content of the body.

ReplyConversationThreadBody dataclass

ReplyConversationThreadBody(post: Optional[NewPostBody] = None)

Definition: ReplyConversationThreadBody

ForwardPostBody dataclass

ForwardPostBody(comment: Optional[str] = None, to_recipients: Optional[List[GetUsersGraphAction]] = None)

Definition: ForwardPost_V2Body

Attributes

comment class-attribute instance-attribute
comment: Optional[str] = field(default=None, metadata={'wire_name': 'Comment'})

Comment to forward with the post.

to_recipients class-attribute instance-attribute
to_recipients: Optional[List[GetUsersGraphAction]] = field(default=None, metadata={'wire_name': 'ToRecipients'})

The recipients to whom the threaded is forwarded to.

CreateConversationBody dataclass

CreateConversationBody(topic: Optional[str] = None, post: Optional[NewPostBody] = None)

Definition: CreateConversationBody

Attributes

topic class-attribute instance-attribute
topic: Optional[str] = None

Topic of the new conversation.

NewPostBody dataclass

NewPostBody(body: Optional[Dict[str, Any]] = None, categories: Optional[List[str]] = None, new_participants: Optional[List[GetUsersGraphAction]] = None, attachments: Optional[List[ClientSendAttachment]] = None)

Definition: NewPostBody

Attributes

body class-attribute instance-attribute
body: Optional[Dict[str, Any]] = None

Body of the new post.

categories class-attribute instance-attribute
categories: Optional[List[str]] = None

The categories associated with the post.

new_participants class-attribute instance-attribute
new_participants: Optional[List[GetUsersGraphAction]] = field(default=None, metadata={'wire_name': 'newParticipants'})

Add participants to the thread as part of this post.

attachments class-attribute instance-attribute
attachments: Optional[List[ClientSendAttachment]] = None

File attachments to include.

GetUsersGraphAction dataclass

GetUsersGraphAction(email_address: Optional[Dict[str, Any]] = None)

Definition: GetUsers__GraphAction

Attributes

email_address class-attribute instance-attribute
email_address: Optional[Dict[str, Any]] = field(default=None, metadata={'wire_name': 'EmailAddress'})

User email address.

ClientSendAttachment dataclass

ClientSendAttachment(type_: Optional[str] = None, name: Optional[str] = None, content_bytes: Optional[str] = None)

Definition: ClientSendAttachment

Attributes

type_ class-attribute instance-attribute
type_: Optional[str] = field(default=None, metadata={'wire_name': '@odata.type'})

@odata.type for a file attachment.

name class-attribute instance-attribute
name: Optional[str] = field(default=None, metadata={'wire_name': 'Name'})

Name of the attachment.

content_bytes class-attribute instance-attribute
content_bytes: Optional[str] = field(default=None, metadata={'wire_name': 'ContentBytes'})

Content of the attachment.

ConversationTriggerResponse dataclass

ConversationTriggerResponse(id: Optional[str] = None, last_delivered_date_time: Optional[str] = None, threads: Optional[List[ConversationThreadTriggerResponse]] = None)

Definition: ConversationTriggerResponse

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

The conversation unique identifier.

last_delivered_date_time class-attribute instance-attribute
last_delivered_date_time: Optional[str] = field(default=None, metadata={'wire_name': 'lastDeliveredDateTime'})

The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.

ConversationThreadTriggerResponse dataclass

ConversationThreadTriggerResponse(id: Optional[str] = None, posts: Optional[List[PostTriggerResponse]] = None)

Definition: ConversationThreadTriggerResponse

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

The conversation thread's unique identifier.

PostTriggerResponse dataclass

PostTriggerResponse(id: Optional[str] = None, last_modified_date_time: Optional[str] = None, change_key: Optional[str] = None)

Definition: PostTriggerResponse

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

The post's unique identifier.

change_key class-attribute instance-attribute
change_key: Optional[str] = field(default=None, metadata={'wire_name': 'changeKey'})

Identifies the version of the post.

Office365groupsmailClient

Office365groupsmailClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)

Bases: ConnectorClientBase

Typed client for office365groupsmail connector.

Initialize a Office365groupsmailClient.

Parameters:

Name Type Description Default
connection_runtime_url str

The connection runtime URL from Azure Portal.

required
token_provider Optional[TokenProvider]

Optional token provider. Defaults to ManagedIdentityTokenProvider.

None
options Optional[ConnectorClientOptions]

Optional connector client options.

None

Methods:

list_conversations_async async
list_conversations_async(group_id: str) -> dict[str, Any] | None

List the conversations of a group

Get all the conversations in this group.

create_conversation_async async
create_conversation_async(input: CreateConversationBody, group_id: str) -> dict[str, Any] | None

Create a new conversation in a group

Create a new conversation in this group.

get_group_conversation_async async
get_group_conversation_async(group_id: str, conversation_id: str) -> dict[str, Any] | None

Get a group conversation

Retrieves the properties of a particular conversation.

list_conversation_threads_async async
list_conversation_threads_async(group_id: str, conversation_id: str) -> dict[str, Any] | None

List the conversation threads of a conversation

Get all the threads in a group conversation.

create_conversation_thread_async async
create_conversation_thread_async(input: CreateConversationBody, group_id: str, conversation_id: str) -> dict[str, Any] | None

Create a conversation thread

Create a new thread in the specified conversation.

list_group_threads_async async
list_group_threads_async(group_id: str) -> dict[str, Any] | None

List the threads of a group

Get all the threads of a group.

create_group_thread_async async
create_group_thread_async(input: CreateConversationBody, group_id: str) -> dict[str, Any] | None

Start a new group conversation by creating a thread

Start a new group conversation by first creating a thread.

get_conversation_thread_async async
get_conversation_thread_async(group_id: str, thread_id: str) -> dict[str, Any] | None

Get a conversation thread

Get a specific thread that belongs to a group.

delete_conversation_thread_async async
delete_conversation_thread_async(group_id: str, thread_id: str) -> None

Delete a conversation thread

Deletes the specified conversation thread.

list_thread_posts_async async
list_thread_posts_async(group_id: str, thread_id: str) -> dict[str, Any] | None

List the posts of a conversation thread

Get all the posts of the specified conversation thread.

get_thread_async async
get_thread_async(group_id: str, thread_id: str, post_id: str) -> dict[str, Any] | None

Get a thread post

Retrieves a post in a specified thread.

get_attachments_async async
get_attachments_async(group_id: str, thread_id: str, post_id: str) -> dict[str, Any] | None

List the attachments of a post

Retrieve a list of attachments that belong to a post.

reply_to_a_thread_async async
reply_to_a_thread_async(input: ReplyConversationThreadBody, group_id: str, thread_id: str) -> None

Reply to a conversation thread

Reply to a thread in a group conversation and add a new post to it.

reply_async async
reply_async(input: ReplyConversationThreadBody, group_id: str, thread_id: str, post_id: str) -> None

Reply to a post

Reply to a post and add a new post to the specified thread in a group conversation.

http_request_async async
http_request_async(input: bytes) -> dict[str, Any] | None

Send an HTTP request

Construct a Microsoft Graph REST API request to invoke. Learn more: https://docs.microsoft.com/en-us/graph/use-the-api

forward_async async
forward_async(input: ForwardPostBody, group_mail: str, conversation_id: str, thread_id: str, post_id: str) -> None

Forward a post

Forward a post to a recipient.

list_groups_async async
list_groups_async() -> dict[str, Any] | None

List user groups

Retrieves all Office 365 Groups the user is part of.