0
votes

I have a bot application developed in java sdk. To integrate with MS Teams, I have a connector has been created using Bot Framework and Spring Boot and a Bot Channels Registration on the Azure portal. Everything working properly. Now I'm trying to implement proactive messages by following this tutorial: https://www.vrdmn.com/2020/02/microsoft-bot-framework-v4-send.html

I can already make the bot send proactive messages on channels, but now I need to implement the post a proactive personal message to a user.

I can get data from a user:

var user = await ((Conversations)connectorClient.Conversations).GetConversationMemberAsync(mentionUserPrincipalName, teamInternalId, default);

enter image description here

But when running the line...

var response = await connectorClient.Conversations.CreateConversationAsync(conversationParameters);

...a bad request result is returned with the message "Invalid user identity in provided tenant":

enter image description here

1
Please verify the logged in user is part of the azure ad or tenant. - Rajeesh Menoth
We are not able to repro the issue at our end. Could you please check Send proactive messages and sample. Try if that helps. - Nikitha-MSFT

1 Answers

0
votes

You can get the user details using teams roster. To create a new conversation or conversation thread in a channel, you must have the correct ID. You can receive or retrieve this ID. Please check Get the user ID, team ID or channel ID. You can also fetch the list the members of a team using teams roaster. Please check Fetch the roster or user profile.