Graphman import fails with Error : The variable input contains a field name 'ldaptype" that is not defined for input object type 'LdapInput' "
search cancel

Graphman import fails with Error : The variable input contains a field name 'ldaptype" that is not defined for input object type 'LdapInput' "

book

Article ID: 418265

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

1. doing export from source gateway

.\graphman.bat export --gateway sandbox --using ldapIdpByName --variables.name "Idp - Used for PolicyManager Login" --output idp_dev.json 

run fine and generated the idp_dev.json file.

2. doing the import on target gateway using the idp_dev.json as input.

 graphmant import --gateway dev_env --input migration\Idp_Migration\idp_dev.json

Error :  The variable input contains a field name 'ldaptype" that is not defined for input object type 'LdapInput' "

 

Environment

CA API Gateway 11.1.x

Graphman 1.3.14

schema v11.1.2

Cause

Neither "ldaps" nor "ldapIdpByName" includes the ldapType entity in the schema. Wrong schema used on export  when --using ldapIdpByName 
The absence of this entity is causing the validation failure you encountered during the import.

 

Resolution

1. To resolve , use ldapslpds which contains ldapType attribute to be queried using command like example:
 
.\graphman.bat export --gateway sandbox --using ldapldps --variables.name "Idp- Used for PolicyManager Login" --output idp_dev.json 
 
2. to review schema description , you can use command :  graphman describe --query ldaps
 
 
 

Additional Information

For reference, below the enclosed query outputs for both of these specific items.
 
graphman describe --query ldaps
[info] query ldaps
query ldaps {
  ldaps {
    goid
    name
    checksum
    ldapUrls
    ldapsClientAuthEnabled
    ldapsClientKeystoreId
    ldapsClientKeyAlias
    searchBase
    writable
    bindDn
    bindPassword
    userMappings {
      objClass
      nameAttrName
      loginAttrName
      passwdAttrName
      firstNameAttrName
      lastNameAttrName
      emailNameAttrName
      kerberosAttrName
      kerberosEnterpriseAttrName
      userCertAttrName
      passwdType {
        val
      }
    }
    groupMappings {
      objClass
      nameAttrName
      memberAttrName
      memberStrategy {
        val
      }
    }
  }
}
 
 
graphman describe --query ldapIdps
[info] query ldapIdps
query ldapIdps {
  ldapIdps {
    goid
    name
    ldapType
    checksum
    serverUrls
    useSslClientAuth
    sslClientKeyAlias
    searchBase
    bindDn
    bindPassword
    writable
    writeBase
    specifiedAttributes
    userMappings {
      objClass
      nameAttrName
      loginAttrName
      passwdAttrName
      firstNameAttrName
      lastNameAttrName
      emailNameAttrName
      kerberosAttrName
      kerberosEnterpriseAttrName
      userCertAttrName
      passwdType {
        val
      }
    }
    groupMappings {
      objClass
      nameAttrName
      memberAttrName
      memberStrategy {
        val
      }
    }
    ntlmProperties {
      name
      value
    }
    properties {
      name
      value
    }
  }
}
 
note:  by using the following command from your graphman cli env 
         
          graphman describe 
 
          you will see all the schema/attributes availables to use with graphman queries