https://discord.gg/botpress logo
#🤝help
How to capture Microsoft Teams username
# 🤝help
s

strong-bear-19626

01/11/2024, 3:52 AM
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

modern-honey-58818

02/01/2024, 7:53 AM
@strong-bear-19626 did it work for you at the end?
Will try this today
s

strong-bear-19626

02/19/2024, 7:20 AM
Yes it did work for me.