Data privacy notice

 

When this content is loaded, usage information is transmitted to Vimeo and may be processed there.

 

             

Using user data in forms

Modified on Thu, 10 Aug, 2023 at 11:45 AM

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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article