The Users API provides you the functionality to manage end-users, and groups in your environment. This API offers you access to a subset of functionality made available by the Users application, which enable you to manage your users, their roles and groups they belong to.

Users API manages the system entities User and Group but include additional logic to them.

To use this API simply reference the Users module using the References Window in the Development Environment.

Actions

Action

Description

EncryptPassword(Text, Text)

Returns the encrypted password using MD5 for a specific username and password.

GetEffectiveUserProviderEspaceId()

Returns the eSpace identifier of the effective user provider. In upgrade scenarios it returns the EnterpriseManager eSpaceId.

Group_CreateNew(Group Record)

Creates a group in the OutSystems Platform. Requires UserManager role assigned to the logged user. Returns the identifier of the group created.

Group_Delete(Group Identifier)

Deletes a group in the OutSystems Platform. Requires UserManager role assigned to the logged user.

Group_Update(Group Record)

Updates a group in the OutSystems Platform. Requires UserManager role assigned to the logged user.

UseActiveDirectoryAuthentication()

Checks if the authentication method is set to Active Directory.

UseIntegratedAuthentication()

Checks if the authentication method is set to Integrated Authentication.

UseLDAPAuthentication()

Checks if the authentication method is set to LDAP.

User_CanChangePassword(User Identifier)

Checks if the password of the specified user is not empty, or the logged user’s username is admin.

User_Create(User Record)

Creates an user in the OutSystems Platform. Requires UserManager role assigned to the logged user. Returns the identifier of the user created.

User_CreateOrUpdate(User Record)

Creates or updates a user in the OutSystems Platform. Requires UserManager role assigned to the logged user. Returns the id of the user created or updated.

User_DeleteIfNoRoles(User Identifier)

Deletes a user in the OutSystems Platform if he has no roles assigned. Used to cleanup application seed data.

User_GetIdByUsername(Text)

Returns the user identifier given the username.

User_GetName()

Returns the name of the logged user.

User_GetUnifiedLoginUrl()

Returns the url used for custom unified login patterns. Includes Windows Integrated Authentication pattern.

User_IsExternalUser(User Identifier)

Checks if the user authenticates in a external system given the user identifier.

User_Login(Text, Text, Boolean)

Action to login using username and password as credentials.

User_Logout()

Logs out the current user. Session variables are cleared during the logout process.

User_Update(User Record)

Creates or updates a user in the OutSystems Platform. Requires UserManager role assigned to the logged user. Returns the id of the user created.

Roles

Action

Description

UserManager

Gives privileges for the end-users to call the actions to create, update, and delete groups and to create, and update users.

See Also

About APIs