Forum Discussion
App Validation Issue - Bot must send a proactive welcome message in personal scope
Hello @ParamZ - Thanks for bringing this issue to our attention.
1.Graph API queries may generate unexpected conversationUpdate events.
Recommended Solution: Use event deduplication based on activity ID and conversation ID to avoid sending duplicate welcome messages.
2.Reading Chat History – Suggested Method:
Best Practice: Save conversation references when the bot is installed, rather than polling the Graph API.
Alternative: Opt for webhooks or change notifications instead of using /me/chats queries.
3.App Validation – Proper Procedure:
Primary Method: Utilize on_installation_update for sending welcome messages to meet validation requirements.
Fallback: Apply on_members_added_activity with deduplication as needed for special cases.
References:
Design and control conversation flow - Bot Service | Microsoft Learn
Teams Store Validation Guidelines - Teams | Microsoft Learn
Please let us know if you have any further query here.
Thank you for the clarification.
Now I understand that for app validation, I need to keep the personal chat welcome message in on_members_added_activity and implement deduplication based on conversation ID. My planned approach is to create a database table that stores the tenant ID and conversation ID when a welcome message is sent, then remove the entry on app uninstall. This should prevent duplicate welcome messages triggered by the Graph API queries. I'll test this implementation and report back on the results.
I still have some confusion about point 2 regarding reading chat history using conversation references. From my testing, the conversation reference and chat ID appear to be different for one-to-one chats. Could you point me to sample code or detailed documentation on this topic? (Ideally showing how to use conversation references to get chat history).
Thank you for your support.