Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapter.createConversation in microsoftTeams 'Could not parse tenant id' #685

Closed
gNechitailo opened this issue Dec 5, 2018 · 3 comments
Closed
Assignees
Labels
4.3 February 14, 2019 Release

Comments

@gNechitailo
Copy link

gNechitailo commented Dec 5, 2018

Versions

What package version of the SDK are you using: "botbuilder": "^4.1.7",
What nodejs version are you using: v8.9.3
What os are you using: mac OS X

Describe the bug

microsoftTeams chat doesn't work with createConversation

Documentation says that I can create a direct conversation with a user after he/she mentioned the bot using
BotFrameworkAdapter.createConversation(address, logic);
example from documentation:

const reference = TurnContext.getConversationReference(context.activity);

// Start a new conversation with the user
await adapter.createConversation(reference, async (ctx) => {
   await ctx.sendActivity(`Hi (in private)`);
});

but the actual behavior I get is exception "Could not parse tenant id"
I tried to research the problem
I have noticed the line:
botbuilder-core/botFrameworkAdapter.ts 229:

public async createConversation(reference: Partial<ConversationReference>, logic?: (context: TurnContext) => Promise<void>): Promise<void> {
...
    const parameters: ConversationParameters = { bot: reference.bot, members: [reference.user] } as ConversationParameters;
}

Then I performed a "monkey patch" (replacing the method) in which I've added
{ ..., channelData: { tenant: { id: %actual_tenant_id% } } } in that line
to parameters. After that everything is okay. How should I fix this the right way?

[bug]

@cleemullins cleemullins added 4.3 February 14, 2019 Release Approved labels Dec 10, 2018
@benbrown
Copy link
Contributor

benbrown commented Jan 7, 2019

This should be fixed by #712

@benbrown
Copy link
Contributor

benbrown commented Feb 6, 2019

The tenantId field is being moved to a new location as part of the fix to this issue:
https://github.com/Microsoft/botframework-obi/pull/43

@sgellock
Copy link
Member

PR #1274 addresses this issue. Will exist in the 4.3 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.3 February 14, 2019 Release
Projects
None yet
Development

No branches or pull requests

5 participants