The properties determined for the authenticated user from the identity provider are stored in the XFC_METADATA object and are thus available inside of forms. The JSON object user contains the rawData property, which contains the determined data as a JSON structure.
The following JS code snippet uses the example of a user authenticating via an LDAP login service to show an access to the LDAP property userPrincipalName using JS in the form:
try { // Read the property and display it in a label var elem = $('[name=txt1]'); var ldap = XFC_METADATA.user.rawData; if(ldap.hasOwnProperty('userPrincipalName')) { elem.html(ldap.userPrincipalName); } } catch (err) {}
Note for LDAP login services: Which data the JSON structure under the rawData property contains depends largely on the read permissions of the LDAP account that performs the user search in the LDAP system. See LDAP and Kerberos respectively.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article