Dear Formspider team,

How can I get OS username of client ?

asked 25 Jul '13, 08:30

Khayyam's gravatar image

accept rate: 0%

Hi Khayyam,

In a web application, it is not possible to retrieve the OS user name of a client machine from the server. The closest you can get is the IP address. You can get the IP address of the client using api_session.getUserIP.

Kind Regards,


answered 25 Jul '13, 08:57

Yalim's gravatar image

Yalim ♦♦
accept rate: 20%

Hi Yalim,

I know about api_session.getUserIP, but the problem is the clients uses Thin Client. So IP is the same for all of them... I need to get username in order to manage their sessions... Is this can be implemented? or its impossible at all ?


(25 Jul '13, 09:04) Khayyam

good question by the way. As far as I understand there is no way to perform that without creating a "login" logic. The nice way to do that is to use Windows AD logins (if it is a windows network of course). But the question is if FS can integrate with AD?

(25 Jul '13, 09:53) viktorK

Hi Anatoly, If you can talk to AD from the Oracle Database, FS will work with it. FS can integrate with any LDAP repository. Here is the relevant tutorial:

(25 Jul '13, 09:59) Yalim Gerger ♦♦

Dear Yalim,

I know about this tutorial, but this is not what I need. This solution is too complex. I dont need all these stuff. I just need OS username. Even if i don't have login logic/panel.

You are getting IP and sometimes this is so helpful.. But in such kind of situations IP doesn't help.. We need OS username. Can you implement this ?

(25 Jul '13, 11:00) Khayyam

Dear Khayyam, This is not a limitation of Formspider. Browsers don't share this information with the server.

(25 Jul '13, 11:02) Yalim ♦♦

Hi Khayyam,

You could call a javascript function through an external method to get the user name. Javascript function content something like:

var wshshell=new ActiveXObject("");
var username=wshshell.ExpandEnvironmentStrings("%username%");

Just not very secure if you want to use it for authentication though....

Best, Michiel A


answered 25 Jul '13, 17:18

Michiel%20A's gravatar image

Michiel A
accept rate: 13%

I don't recommend this since using ActiveXObject is only supported on IE.

(26 Jul '13, 05:53) oskansavli ♦♦

Hi Oskan,

You are right. I didn't think about that last evening (probably should not post solutions that late at night ;)

(26 Jul '13, 05:55) Michiel A

If the app is an internal app that runs only in the company intranet and IE is the only browser that runs on company PC's, this is a valid option. There are many organizations that fit this description.

(26 Jul '13, 05:59) Yalim Gerger ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 25 Jul '13, 08:30

Seen: 2,313 times

Last updated: 26 Jul '13, 05:59

Related questions

© Copyright Gerger 2017