PingFederate provides an advanced option allowing administrators to map user attributes by way of an expression language. Below are sample OGNL expressions for common use case requirements with the PingFederate Box Connector. To enable use of expressions in PingFederate, see Enabling and disabling expressions in the PingFederate documentation.
The below sample expressions are intended for use with the Personal Folder Name attribute. This may be configured under 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.
Lastname, Firstname
The below 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 below 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 below expression would produce the format acollins
, where the user Audrey
Collins has an email address acollins@example.com
.
#this.get("mail").toString().split("@")[0]