Get the current machine user to be used in active directory

Get the current machine user to be used in active directory

  
Hi All,

Is there a way to get the current machine user?

Thanks,
Ron

Hi Ron.
For obvious security reasons, JavaScript isn't able to access such properties.

It can be done, via ActiveX, and that means it will only be compatible with Internet Explorer, at the expense of some warnings that will popup for the user.

Here's how
<script type="text/JavaScript">
var wshshell=new ActiveXObject("wscript.shell");
var username=wshshell.ExpandEnvironmentStrings("%username%");
alert(username);
</script>
Hi,

Well the only way to get the user on server side is if you are using Integrated Authentication. With that is possible to get it by using the IntegratedSecurityGetDetails from the System reference. It's not added by default on new eSpaces so you will need to use add remove references to add it.

Any other alternatives or workarounds will most likely hit security issues and/or browser compatibility.





Regards,
João Rosado