AD sync scripting

Active directory sync scripting

When syncing Active Directory groups to flow there are some additional functions available. The script will be executed for each user. User profile can be reached from record Profile.

Set User Property

User properties on the user level can be set for each user. The first argument is the property name and the second argument is property value.

exec SetUserProperty('Organisation', 'Novacura AB');

Set Connector Login

If a user should authenticate against a certain connector then at least a username should be set for each user. This can be configured with this function. The first argument is connector name, the second argument is username and the last argument is password (should be empty string for enable password prompting).

exec SetConnectorLogin('IFS', Profile.Login, '');

Get Ad Property

This function is used for accessing properties set in the active directory.

let givenName = GetAdProperty('givenName');

Set User Level

In order to set user level for a user this function is used. Valid values are: Work/AdministerWorkflows/AdministerBasicData, as default user level will be set to Work.

exec SetUserLevel('AdministerBasicData');

Set User Type

This function will set user type. Valid values are: FullUser/WorkflowUser/MachineUser/TransactionUser/PortalUser, as default user level will be set to FullUser.

exec SetUserType('WorkflowUser');

Set AD Authenticate

This function will set whether the user should be authenticated against the active directory or if another system will handle the authentication.

exec SetAdAuthenticate(1);

Other Functions

Additional functions:

exec SetLanguage('en');
exec SetCulture('sv-SE');
exec SetGroup('Sales');
let enabled = GetAdProperty('Enabled');
exec SetActive(enabled);

More about Flow Script

See FlowScript programs

See FlowScript functions

Last updated