Category: Question and Answers
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

How can i get Windows Username OR Computername

Issue

I wanted to display only the data of the user who opens the Appsmith App, so I tried to get the Windows username or computer name of the client. However, it wasn't possible at this juncture. I solved it by sending each user a link with their username and computer name as parameters, but this may not be secure as someone could potentially manipulate the parameters.

Resolution

The user wanted to display data based on the Windows Username or Computername in their Appsmith application. After trying to use ActiveXObject in JavaScript and realizing it was not possible, they decided to pass the Username and Computername as parameters in the URL when opening the application.

To achieve this, the user sent each user a unique URL containing their Username and Computername as parameters. They then used the Appsmith URL Query Parameters to retrieve these parameters and display the relevant data in the application.

While this solution may not be the most secure, the user stated that it was acceptable for their internal application. However, in a more secure setting, it is recommended to use Windows integrated authentication provided by IIS.