Microsoft Teams Integration : How to pass user profile information to botpress

I am integrating my botpress chatbot with microsoft teams for its use from internal team members. It helps users to have 1:1 chat with the bot. I have couple of questions linked to this.

  1. How can I pass the information of the user who is interacting with the bot to botpress? For example the user name, its location etc so that I can further tune the bot to respond based on this profile information. For e.g. based on the location, the bot could respond to the same question in different ways
  2. How can I authenticate & authorize the bot with third party applications that expose rest api’s? Any user interacting with the bot is a authenticated user already since he is able to access microsoft teams hence further asking the user for its credentials in order to make third party application api calls sounds redundant.


Any inputs on the above queries? - @franklevasseur

@allardy - any inputs on this topic would be appreciated.

Hi @shahamit Teams integration is basic at the moment, we don’t fetch the user’s information at the moment. I suggest you open an issue on the github repo to ask for a feature request, and maybe someone could work on that.

For #2, we have a new feature coming soon to handle authentication of users through different channels (configurable duration). It should be available in the release v12.2.x. This will grant the user access to flows or nodes which would be blocked otherwise. Secure actions could be protected that way.

Not sure to understand the part about the third party application, could you be a bit more specific?

Thanks @allardy for the follow up.

I have added the github issue for the user information.

To understand the authentication use case consider this flow. Assume the user is interacting with the bot through microsoft teams. For a certain user input, the bot makes a rest api call which requires user authentication. How can we design the api call in botpress?


@allardy - any comments/suggestions?

@shahamit We have an upcoming feature that will add support natively for authentication through different channels (ex: user using channel teams can log on using either username/password, or saml/oauth2/ldap, and he will be authorized for the duration configured for that specific channel).

Until then, it would require setting up an API route and using the KVS to keep the state of the user.

@allardy - Thanks for the reply but I didn’t quite follow what you mean by “native support for authentication”. A user using teams would already be authenticated. How can this authentication be extended to the REST API call made by botpress on the third party server like Jenkins?
Also currently we don’t even have the user profile of the user interacting on teams. Is that the support you are referring to?

Here’s a diagrammatic representation of the flow - I am referring to step 2 in the below flow.