Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 755 Bytes

File metadata and controls

23 lines (18 loc) · 755 Bytes
description Automatically generated file. DO NOT MODIFY
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.chat_message import ChatMessage
from msgraph.generated.models.item_body import ItemBody
from msgraph.generated.models.body_type import BodyType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ChatMessage(
	body = ItemBody(
		content_type = BodyType.Html,
		content = "<codeblock class=\"plaintext\"><code>Hello world</code></codeblock>",
	),
)

result = await graph_client.chats.by_chat_id('chat-id').messages.post(request_body)