How to capture Microsoft Teams username
# 🤝help
s
I'm using Botpress cloud and wondering if I can get the teams username. There's a variable event.userId and event.tags.user['teams:id'] but neither doesn't seem to be the user's id in Teams or AzureAD.
It seems Botpress Cloud doesn't retrieve the Teams username natively. Had to create an Execute code card to get that from Bot Framework API using the Get conversation members endpoint with the conversation id event.tags.conversation['teams:id'] Reference: https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-authentication?view=azure-bot-service-4.0 https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0
m
@strong-bear-19626 did it work for you at the end?
Will try this today
s
Yes it did work for me.