Get Or Assign user id

Copper Contributor

Hi Guys,

 

I have noticed that while creating logs azure health bot assigns a dummy userId something like `debug_45jfff454gaa`, Is it possible to assign user a dummy self created Id, and if not, can we get the self assigned userId.

 

@Adam Walker  @GregoryLisiak 

Thanks 

2 Replies

@vaibhavsharma 

 

Hi, The "Debug" prefix IDs are only applicable when you use the webchat client that is integrated in the visual authoring environment. 

When you deploy a bot to production you will likely deploy your own web chat client. In the client code, you can generate and custom User ID. Make sure to use an obfuscated ID that will not directly identify the user to maintain privacy. 

See in this webchat code sample (line 87) that a random GUID is generated for the User ID:

HealthBotContainerSample/server.js at master · microsoft/HealthBotContainerSample · GitHub

 

Regards, Adam

Adam didn't get your point, how will I set it in my bot.