You can retrieve this information by using the SOAP API on the AccountUser object.
Here is an example call to retrieve data from the AccountUser object. This will find users with a specific email address and display the selected fields (Email, Roles and IsAPIUser in this instance).
<script runat="server">
Platform.Load("Core", "1.1.1");
try {
/* Begin Retrieve Request */
var email = "[email protected]";
var rr = Platform.Function.CreateObject("RetrieveRequest");
Platform.Function.SetObjectProperty(rr, "ObjectType", "AccountUser");
Platform.Function.AddObjectArrayItem(rr, "Properties", "Email");
Platform.Function.AddObjectArrayItem(rr, "Properties", "Roles");
Platform.Function.AddObjectArrayItem(rr, "Properties", "IsAPIUser");
/* Filter Response */
var sfp = Platform.Function.CreateObject("SimpleFilterPart");
Platform.Function.SetObjectProperty(sfp, "Property", "Email");
Platform.Function.SetObjectProperty(sfp, "SimpleOperator", "equals");
Platform.Function.AddObjectArrayItem(sfp, "Value", email);
Platform.Function.SetObjectProperty(rr, "Filter", sfp);
/* Invoke Retrieve */
var rows = Platform.Function.InvokeRetrieve(rr, results);
Write(Stringify(rows));
} catch(e) {
Write(Stringify(e));
}
</script>