Box Provisioner

Sample OGNL expressions

PingFederate provides an advanced option allowing administrators to map user attributes by way of an expression language. The following are sample OGNL expressions for common use case requirements with the PingFederate Box Connector. Learn more about enabling expressions in PingFederate in Enabling and disabling expressions in the PingFederate documentation.

The below sample expressions are intended for use with the Personal Folder Name attribute. This can be configured under SP Connection → Configure Channels → Channel → Attribute Mapping when Create Personal Folders is enabled. To configure the Personal Folder Name attribute, select Edit, add all necessary attributes for the evaluation of the expression, and configure the expression.

Example

Lastname, Firstname

The following expression would produce the format Collins, Audrey for the user Audrey Collins.

#lastname = #this.get("sn").toString(),
#firstname = #this.get("givenName").toString(),
#foldername = #lastname + ", " + #firstname

Lastname, Firstname (Department)

The following expression would produce the format Collins, Audrey (Sales), where the user Audrey Collins works in the Sales department.

#lastname = #this.get("sn").toString(),
#firstname = #this.get("givenName").toString(),
#department = #this.get("department").toString(),
#foldername = #lastname + ", " + #firstname + " (" + #department + ")"

Remove Domain from Email Address

The following expression would produce the format acollins, where the user Audrey Collins has an email address acollins@example.com.

#this.get("mail").toString().split("@")[0]