I'm working on a bot for MS Teams, and running into an issue. When trying to initiate a conversation from the bot, I get this error:
Microsoft.Rest.HttpOperationException: Could not parse tenant id
I haven't been able to find anywhere in the docs that mentions a required Tenant ID, and I never set one up in the application. How can I specify this, or is the root cause something else?
Below is the code I am using that returns the error (strings obfuscated).
private ConversationResourceResponse GetConversation(IActivity activity)
{
var connector = new ConnectorClient(new Uri(activity.ServiceUrl));
var userAccount = new ChannelAccount("[email protected]");
var botAccount = new ChannelAccount("@botHandle", "botName");
var conversationId = connector.Conversations.CreateDirectConversation(botAccount, userAccount);
return conversationId;
}
Thank you!