What are the default properties of a user which can be read with ArUserGetProperty

Versions used: AS 4.12.6 / AR J4.93 / mapp 5.24

I was looking in the AS Help for information about ArUserGetProperty and also the ‘Set’ variant of the FB. It does not give a list of the properties you can read, only that if the property does not exist, it will be created with ArUserSetProperty.

With ArUserExportEx you can export the users, and the properties that are defined for them will be exported as well. (The Help doesn’t tell the file type, but its .xml)

This is an export of such file, from the mappServicesHighlights demo:

<Configuration>
	<Element ID="Anonymous" Type="User" Location="System/RBAC/UserConfiguration" TechnologyPackage="AAS" Version="n.d">
		<Property ID="Password" DataType="STRING"></Property>
		<Group ID="Roles">
			<Property ID="Role[1]" DataType="STRING">Everyone</Property>
		</Group>
		<Property ID="SystemElementID" DataType="STRING">Role</Property>
		<Property ID="UserID" DataType="UINT">1</Property>
	</Element>
	<Element ID="__AUDITLISTENER__" Type="User" Location="System/RBAC/UserConfiguration" TechnologyPackage="RBAC" Version="">
		<Property ID="Password" DataType="STRING">xnXEMoiXvw2vmvzAd/f7sV2wt8GAFuZwJEQVFn32VDcZtUNVtec=</Property>
		<Group ID="Roles">
			<Property ID="Role[1001]" DataType="STRING">Everyone</Property>
			<Property ID="Role[1002]" DataType="STRING">Administrators</Property>
		</Group>
		<Property ID="UserID" DataType="UINT">1001</Property>
	</Element>
	<Element ID="admin" Type="User" Location="System/RBAC/UserConfiguration" TechnologyPackage="AAS" Version="n.d">
		<Property ID="Password" DataType="STRING">BWbK9pi3rdOjD1S0UpziVjpRgxJfpwS/gd8U3AGjYRQ7l5Fk3kk=</Property>
		<Group ID="Roles">
			<Property ID="Role[1]" DataType="STRING">Administrators</Property>
		</Group>
		<Property ID="SystemElementID" DataType="STRING">Role</Property>
		<Property ID="UserID" DataType="UINT">2</Property>
	</Element>
</Configuration>

Here is a list of the default properties, you can read them with the FB using ElementType arUSER_USER_PROPERTIES, ( = 5 )

  • Password
  • UserId
  • SystemElementID
  • Roles/Role[n] ← group elements

There are group elements in the export, which is now only the group with ID ‘Roles’. I wanted to read these group properties also with ArUserGetProperty, but it gives error -1070585892. After some trial and error it appeared that using the / was the correct form and it worked.

I hope this topic helps when starting with programming around the properties of the users with ArUser.

1 Like

cool,thanks for that :slight_smile:

1 Like