SOLVED

Capture Logged in User's Mail

Copper Contributor

I am saving feedback data using

session.saveFeedback() method but I also want the logged in users email to be saved. How can i get that information .Thanks in advance.@Adam Walker 

 

3 Replies

@Debpratim - It depends on how you are implementing the authentication, but I assume you are doing the authentication before you load the bot (for example, you have a portal experience and then you show the webchat) you should have access to the login details in that page. You should send the email as part of the custom arguments that invokes the bot. Anything you pass in those arguments is available in the scenarioArgs in the scenario that you build in Health Bot. See this doc:
Programmatic Client Side Scenario Invocation - Health Bot | Microsoft Docs

@Adam Walker Thanks Adam , for now i want to publish the bot in teams channel and and want the currently logged in user details to be captured. Any ways to achieve this

best response confirmed by Debpratim (Copper Contributor)
Solution

@Debpratim Look inside the 

session.message

variable in the Health Bot scenario (you can print it in a statement step). This might have the information you need. 

1 best response

Accepted Solutions
best response confirmed by Debpratim (Copper Contributor)
Solution

@Debpratim Look inside the 

session.message

variable in the Health Bot scenario (you can print it in a statement step). This might have the information you need. 

View solution in original post