<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Leveraging LDAP-Based Option Lists in Morpheus in Software - General</title>
    <link>https://community.hpe.com/t5/software-general/leveraging-ldap-based-option-lists-in-morpheus/m-p/7267136#M1516</link>
    <description>&lt;P&gt;In modern enterprise environments, integrating automation platforms with directory services is essential for ensuring accuracy, scalability, and a seamless user experience. One such powerful integration is the use of LDAP-based option lists in Morpheus.&lt;/P&gt;&lt;P&gt;This blog walks through what LDAP option lists are, how they work, and how we leverage them effectively in real-world use cases.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;What are LDAP-Based Option Lists?&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;LDAP-based option lists allow Morpheus to dynamically fetch data from Active Directory and present it within catalog forms.&lt;/P&gt;&lt;P&gt;Instead of manually entering values, users can:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Select existing users&lt;/LI&gt;&lt;LI&gt;Choose groups&lt;/LI&gt;&lt;LI&gt;Pick service accounts&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This ensures that all inputs are valid, consistent, and aligned with Active Directory.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Why Use LDAP Option Lists?&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Eliminate Manual Errors&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Manual input can lead to typos or invalid entries. LDAP option lists ensure users select only valid objects.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Real-Time Data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Since data is fetched directly from Active Directory:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;New objects appear automatically&lt;/LI&gt;&lt;LI&gt;Deleted objects are no longer shown&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;3.&amp;nbsp; Improved User Experience&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Users can search and select instead of typing, making the process faster and more intuitive.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Real-World Use Case&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;In enterprise environments, LDAP option lists are commonly integrated across multiple service catalogs and workflows such as:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;User creation&lt;/LI&gt;&lt;LI&gt;User disable/delete operations&lt;/LI&gt;&lt;LI&gt;Service account management&lt;/LI&gt;&lt;LI&gt;Group assignments&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;For example, during user onboarding:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Fields like username and email may be entered manually&lt;/LI&gt;&lt;LI&gt;However, while assigning users to existing groups, manual input can lead to errors&lt;/LI&gt;&lt;LI&gt;Users may also not be aware of the exact group names available in Active Directory&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;To address this, LDAP-based option lists can be implemented to dynamically fetch available groups directly from Active Directory. This allows users to search and select the required group from a predefined list instead of manually entering values.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Key Components of LDAP Option List Configuration in Morpheus&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;When configuring an LDAP-based Option List in Morpheus, understanding each component is critical to ensure secure, efficient, and user-friendly data retrieval from Active Directory. Below are the core elements involved in the configuration:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. LDAP URL&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The LDAP URL defines how Morpheus connects to your directory service (typically Active Directory). It specifies the protocol, domain controller, and port.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Format:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ldap://&amp;lt;domain-controller&amp;gt;:389
ldaps://&amp;lt;domain-controller&amp;gt;:636&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;LDAP (Port 389):&lt;/STRONG&gt; Standard, non-encrypted connection&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;LDAPS (Port 636):&lt;/STRONG&gt; Secure connection using SSL/TLS (strongly recommended)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Using LDAPS ensures that credentials and query data are encrypted during transmission, which is essential for production environments and security compliance.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Base DN (Search Base)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The Base DN defines the starting point in the directory hierarchy for LDAP searches.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;OU=Users,DC=example,DC=com&lt;/LI-CODE&gt;&lt;P&gt;Instead of searching the entire directory, specifying a targeted Base DN:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Improves query performance&lt;/LI&gt;&lt;LI&gt;Reduces unnecessary data retrieval&lt;/LI&gt;&lt;LI&gt;Ensures only relevant objects are returned&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This is especially important in large enterprise directories.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. LDAP Filter&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The LDAP filter determines &lt;STRONG&gt;which objects and attributes&lt;/STRONG&gt; are retrieved from Active Directory.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(&amp;amp;(objectClass=user)(cn=&amp;lt;%=phrase%&amp;gt;*))&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;Breakdown:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;objectClass=user → Limits results to user objects&lt;/LI&gt;&lt;LI&gt;cn=&amp;lt;%=phrase%&amp;gt;* → Matches users whose common name starts with the input value&lt;/LI&gt;&lt;LI&gt;&amp;lt;%=phrase%&amp;gt; → Dynamic placeholder replaced at runtime with user input&lt;/LI&gt;&lt;LI&gt;* → Wildcard enabling partial matching&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This configuration enables a &lt;STRONG&gt;search-as-you-type&lt;/STRONG&gt; experience, where results dynamically update as the user types. It also improves performance by narrowing down results early in the query process.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4. Translation Script&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The translation script is used to convert raw LDAP query results into a more meaningful and user-friendly display format within Morpheus.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Benefits:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Enhances readability&lt;/LI&gt;&lt;LI&gt;Provides additional context (e.g., email, username)&lt;/LI&gt;&lt;LI&gt;Improves overall user experience in selection lists&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Deep Dive: Translation Script Explained with a Real Example&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;To truly understand how a Translation Script works in Morpheus, let’s break down a real example and see how raw LDAP data is transformed step by step.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Sample Translation Script&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;for(var x=0; x &amp;lt; data.length; x++) {
  var row = data[x];
  var a = {};
  if(row.cn != null) {
    a['name'] = row.cn;
  }
  a['value'] = row.sAMAccountName;
  results.push(a);
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;What This Script Does&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This script processes LDAP query results stored in the data array and converts each record into a format that Morpheus can display in an Option List.&lt;/P&gt;&lt;P&gt;At a high level, it:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Iterates through all LDAP results&lt;/LI&gt;&lt;LI&gt;Extracts required attributes&lt;/LI&gt;&lt;LI&gt;Builds a structured object (name, value)&lt;/LI&gt;&lt;LI&gt;Pushes the formatted result into the final results array&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Step-by-Step Breakdown&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Loop Through LDAP Results&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;for(var x=0; x &amp;lt; data.length; x++)&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Iterates over each LDAP record returned from Active Directory&lt;/LI&gt;&lt;LI&gt;data.length represents total number of matched users&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;2. Access Each Record&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var row = data[x];&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Each row contains LDAP attributes like:&lt;/LI&gt;&lt;UL&gt;&lt;LI&gt;cn (Common Name / Full Name)&lt;/LI&gt;&lt;LI&gt;sAMAccountName (Username)&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;3. Create a New Output Object&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var a = {};&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Initializes an empty object to store transformed data&lt;/LI&gt;&lt;LI&gt;This will later become one dropdown entry&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;4. Set Display Name (Conditionally)&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(row.cn != null) {
  a['name'] = row.cn;
}&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Checks if cn exists (avoids null issues)&lt;/LI&gt;&lt;LI&gt;Assigns it as the &lt;STRONG&gt;display value&lt;/STRONG&gt; (name)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This ensures users see a readable name like: John Doe&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5. Set Internal Value&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;a['value'] = row.sAMAccountName;&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Assigns sAMAccountName as the &lt;STRONG&gt;actual value &lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;This is what Morpheus stores and uses internally&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;Example: jdoe&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;6. Add to Final Results&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;results.push(a);&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Adds the transformed object to the results array&lt;/LI&gt;&lt;LI&gt;This array is returned to Morpheus UI&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Input vs Output Example&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LDAP Input (Raw Data):&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "cn": "John Doe",
  "sAMAccountName": "jdoe"
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;Output After Script:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "name": "John Doe",
  "value": "jdoe"
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Benefits at a Glance&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;Real-time integration with Active Directory&lt;/LI&gt;&lt;LI&gt;Accurate and validated inputs&lt;/LI&gt;&lt;LI&gt;Faster and easier user interaction&lt;/LI&gt;&lt;LI&gt;Reduced operational errors&lt;/LI&gt;&lt;LI&gt;Scalable and maintainable solution&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;U&gt;Best Practices&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use &lt;STRONG&gt;specific LDAP filters&lt;/STRONG&gt; to limit results&lt;/LI&gt;&lt;LI&gt;Define a &lt;STRONG&gt;targeted Base DN&lt;/STRONG&gt; for better performance&lt;/LI&gt;&lt;LI&gt;Use a &lt;STRONG&gt;read-only service account&lt;/STRONG&gt; for Bind DN&lt;/LI&gt;&lt;LI&gt;Avoid broad queries that return excessive data&lt;/LI&gt;&lt;LI&gt;Use translation scripts for better display formatting&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Conclusion&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;LDAP-based option lists play a crucial role in enhancing catalog usability and reliability in Morpheus. By replacing manual inputs with real-time, validated selections from Active Directory, organizations can significantly improve accuracy, efficiency, and user experience.&lt;/P&gt;&lt;P&gt;When implemented correctly, they act as a seamless bridge between automation workflows and enterprise directory services.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Bhavadharini Samiappan&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Hewlett Packard Enterprise (PSD-GCC)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 May 2026 16:03:43 GMT</pubDate>
    <dc:creator>Bhavadharini</dc:creator>
    <dc:date>2026-05-14T16:03:43Z</dc:date>
    <item>
      <title>Leveraging LDAP-Based Option Lists in Morpheus</title>
      <link>https://community.hpe.com/t5/software-general/leveraging-ldap-based-option-lists-in-morpheus/m-p/7267136#M1516</link>
      <description>&lt;P&gt;In modern enterprise environments, integrating automation platforms with directory services is essential for ensuring accuracy, scalability, and a seamless user experience. One such powerful integration is the use of LDAP-based option lists in Morpheus.&lt;/P&gt;&lt;P&gt;This blog walks through what LDAP option lists are, how they work, and how we leverage them effectively in real-world use cases.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;What are LDAP-Based Option Lists?&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;LDAP-based option lists allow Morpheus to dynamically fetch data from Active Directory and present it within catalog forms.&lt;/P&gt;&lt;P&gt;Instead of manually entering values, users can:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Select existing users&lt;/LI&gt;&lt;LI&gt;Choose groups&lt;/LI&gt;&lt;LI&gt;Pick service accounts&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This ensures that all inputs are valid, consistent, and aligned with Active Directory.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Why Use LDAP Option Lists?&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Eliminate Manual Errors&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Manual input can lead to typos or invalid entries. LDAP option lists ensure users select only valid objects.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Real-Time Data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Since data is fetched directly from Active Directory:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;New objects appear automatically&lt;/LI&gt;&lt;LI&gt;Deleted objects are no longer shown&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;3.&amp;nbsp; Improved User Experience&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Users can search and select instead of typing, making the process faster and more intuitive.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Real-World Use Case&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;In enterprise environments, LDAP option lists are commonly integrated across multiple service catalogs and workflows such as:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;User creation&lt;/LI&gt;&lt;LI&gt;User disable/delete operations&lt;/LI&gt;&lt;LI&gt;Service account management&lt;/LI&gt;&lt;LI&gt;Group assignments&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;For example, during user onboarding:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Fields like username and email may be entered manually&lt;/LI&gt;&lt;LI&gt;However, while assigning users to existing groups, manual input can lead to errors&lt;/LI&gt;&lt;LI&gt;Users may also not be aware of the exact group names available in Active Directory&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;To address this, LDAP-based option lists can be implemented to dynamically fetch available groups directly from Active Directory. This allows users to search and select the required group from a predefined list instead of manually entering values.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Key Components of LDAP Option List Configuration in Morpheus&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;When configuring an LDAP-based Option List in Morpheus, understanding each component is critical to ensure secure, efficient, and user-friendly data retrieval from Active Directory. Below are the core elements involved in the configuration:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. LDAP URL&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The LDAP URL defines how Morpheus connects to your directory service (typically Active Directory). It specifies the protocol, domain controller, and port.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Format:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ldap://&amp;lt;domain-controller&amp;gt;:389
ldaps://&amp;lt;domain-controller&amp;gt;:636&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;LDAP (Port 389):&lt;/STRONG&gt; Standard, non-encrypted connection&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;LDAPS (Port 636):&lt;/STRONG&gt; Secure connection using SSL/TLS (strongly recommended)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Using LDAPS ensures that credentials and query data are encrypted during transmission, which is essential for production environments and security compliance.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Base DN (Search Base)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The Base DN defines the starting point in the directory hierarchy for LDAP searches.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;OU=Users,DC=example,DC=com&lt;/LI-CODE&gt;&lt;P&gt;Instead of searching the entire directory, specifying a targeted Base DN:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Improves query performance&lt;/LI&gt;&lt;LI&gt;Reduces unnecessary data retrieval&lt;/LI&gt;&lt;LI&gt;Ensures only relevant objects are returned&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This is especially important in large enterprise directories.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. LDAP Filter&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The LDAP filter determines &lt;STRONG&gt;which objects and attributes&lt;/STRONG&gt; are retrieved from Active Directory.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(&amp;amp;(objectClass=user)(cn=&amp;lt;%=phrase%&amp;gt;*))&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;Breakdown:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;objectClass=user → Limits results to user objects&lt;/LI&gt;&lt;LI&gt;cn=&amp;lt;%=phrase%&amp;gt;* → Matches users whose common name starts with the input value&lt;/LI&gt;&lt;LI&gt;&amp;lt;%=phrase%&amp;gt; → Dynamic placeholder replaced at runtime with user input&lt;/LI&gt;&lt;LI&gt;* → Wildcard enabling partial matching&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This configuration enables a &lt;STRONG&gt;search-as-you-type&lt;/STRONG&gt; experience, where results dynamically update as the user types. It also improves performance by narrowing down results early in the query process.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4. Translation Script&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The translation script is used to convert raw LDAP query results into a more meaningful and user-friendly display format within Morpheus.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Benefits:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Enhances readability&lt;/LI&gt;&lt;LI&gt;Provides additional context (e.g., email, username)&lt;/LI&gt;&lt;LI&gt;Improves overall user experience in selection lists&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Deep Dive: Translation Script Explained with a Real Example&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;To truly understand how a Translation Script works in Morpheus, let’s break down a real example and see how raw LDAP data is transformed step by step.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Sample Translation Script&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;for(var x=0; x &amp;lt; data.length; x++) {
  var row = data[x];
  var a = {};
  if(row.cn != null) {
    a['name'] = row.cn;
  }
  a['value'] = row.sAMAccountName;
  results.push(a);
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;What This Script Does&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This script processes LDAP query results stored in the data array and converts each record into a format that Morpheus can display in an Option List.&lt;/P&gt;&lt;P&gt;At a high level, it:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Iterates through all LDAP results&lt;/LI&gt;&lt;LI&gt;Extracts required attributes&lt;/LI&gt;&lt;LI&gt;Builds a structured object (name, value)&lt;/LI&gt;&lt;LI&gt;Pushes the formatted result into the final results array&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Step-by-Step Breakdown&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Loop Through LDAP Results&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;for(var x=0; x &amp;lt; data.length; x++)&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Iterates over each LDAP record returned from Active Directory&lt;/LI&gt;&lt;LI&gt;data.length represents total number of matched users&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;2. Access Each Record&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var row = data[x];&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Each row contains LDAP attributes like:&lt;/LI&gt;&lt;UL&gt;&lt;LI&gt;cn (Common Name / Full Name)&lt;/LI&gt;&lt;LI&gt;sAMAccountName (Username)&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;3. Create a New Output Object&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var a = {};&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Initializes an empty object to store transformed data&lt;/LI&gt;&lt;LI&gt;This will later become one dropdown entry&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;4. Set Display Name (Conditionally)&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(row.cn != null) {
  a['name'] = row.cn;
}&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Checks if cn exists (avoids null issues)&lt;/LI&gt;&lt;LI&gt;Assigns it as the &lt;STRONG&gt;display value&lt;/STRONG&gt; (name)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This ensures users see a readable name like: John Doe&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5. Set Internal Value&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;a['value'] = row.sAMAccountName;&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Assigns sAMAccountName as the &lt;STRONG&gt;actual value &lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;This is what Morpheus stores and uses internally&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;Example: jdoe&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;6. Add to Final Results&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;results.push(a);&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;Adds the transformed object to the results array&lt;/LI&gt;&lt;LI&gt;This array is returned to Morpheus UI&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Input vs Output Example&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LDAP Input (Raw Data):&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "cn": "John Doe",
  "sAMAccountName": "jdoe"
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;Output After Script:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "name": "John Doe",
  "value": "jdoe"
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Benefits at a Glance&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;Real-time integration with Active Directory&lt;/LI&gt;&lt;LI&gt;Accurate and validated inputs&lt;/LI&gt;&lt;LI&gt;Faster and easier user interaction&lt;/LI&gt;&lt;LI&gt;Reduced operational errors&lt;/LI&gt;&lt;LI&gt;Scalable and maintainable solution&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;U&gt;Best Practices&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use &lt;STRONG&gt;specific LDAP filters&lt;/STRONG&gt; to limit results&lt;/LI&gt;&lt;LI&gt;Define a &lt;STRONG&gt;targeted Base DN&lt;/STRONG&gt; for better performance&lt;/LI&gt;&lt;LI&gt;Use a &lt;STRONG&gt;read-only service account&lt;/STRONG&gt; for Bind DN&lt;/LI&gt;&lt;LI&gt;Avoid broad queries that return excessive data&lt;/LI&gt;&lt;LI&gt;Use translation scripts for better display formatting&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Conclusion&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;LDAP-based option lists play a crucial role in enhancing catalog usability and reliability in Morpheus. By replacing manual inputs with real-time, validated selections from Active Directory, organizations can significantly improve accuracy, efficiency, and user experience.&lt;/P&gt;&lt;P&gt;When implemented correctly, they act as a seamless bridge between automation workflows and enterprise directory services.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Bhavadharini Samiappan&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Hewlett Packard Enterprise (PSD-GCC)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2026 16:03:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-general/leveraging-ldap-based-option-lists-in-morpheus/m-p/7267136#M1516</guid>
      <dc:creator>Bhavadharini</dc:creator>
      <dc:date>2026-05-14T16:03:43Z</dc:date>
    </item>
  </channel>
</rss>

