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.


you can use microsoft graph api


  1. Get Token
  2. User threadId and userId to get more info about conversation or users

for example: first step:POST / HTTP/1.1Host: login. -

@Yambr Thanks for digging up the topic. I’m also using OAuth to acquire a token for MS Graph. I refrained from using the ms teams channel because of overall inconveniences, but it would be great if this could be integrated more seamlessly with ms teams!

@shahamit nice diagrammatic representation! How exactly did you implement it? Botpress has one set of credentials for Jenkins, and Jenkins has one set of credentials for Botpress (a token could be a set of credentials too) or more/differently?

Hello @Yambr , I didn’t have problem with step 1 (token), but in step 2 when I tried to do this using threadId, I got a message:

“Bad format of conversation ID”

Can you explain more about this?