Skip to content

create_reply leads to validation errors #102

Closed

Description

@maaisde

I'm in the middle of migrating from the Bot Framework to the Microsoft 365 Agent SDK and noticed that the create_reply function isn't working, when I try to send a message as a reply to another message in Microsoft teams.
Library: microsoft-agents-activity/microsoft/agents/activity/activity.py --> create_reply
Image
https://learn.microsoft.com/en-us/python/api/microsoft-agents-core/microsoft.agents.core.models.activity.activity?view=agent-sdk-python-latest
My implementation:

async def _reply_to_id(self, turn_context: TurnContext, text: str):
        original_activity = turn_context.activity
        reply_activity = Activity.create_reply(original_activity, text)
        await turn_context.send_activity(reply_activity)

Errors:

ValueError: 2 validation errors for ConversationAccount
is_group
  Input should be a valid boolean [type=bool_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.11/v/bool_type
name
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.11/v/string_type

Activity

  1. rodrigobr-msft commented on Sep 8, 2025

    @rodrigobr-msft
    Contributor

    Hello. This should be addressed with these changes from last Friday: #108

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions