1 Reply Latest reply on Jun 28, 2017 8:49 AM by Jan Persson

    Microsoft AD Adapter - Enable/Disable User Account fails

    Jan Persson

      Hi,

      When I run Enable or Disable User account via the Microsoft AD Adapter version 20.16.03 on BAO 7.8.02, I get error messages saying that the

      "dsmod failed:Value for 'Target object for this command' has incorrect format." and "Remote application exited with code: -2147024809".

       

      I've tried to run the exact same dsmod command from the AD server itself and that works fine,

      dsmod user  "CN=FirstName LastName,CN=Users,DC=domainname,DC=comapnyname,DC=se" -disabled no

       

      I also tried to use the Windows Command Adapter and the process :AutoPilot-AD-Utilities:Terminal:Windows Command.

      I ran the dsmod command from there with the same target and it worked without any problem.

       

      I should also mention that "Get User Information" works fine via the AD Adapter but Enable/Disable doesn't.

       

      The target xml looks like below, replaced the real values with names:

      <target>

            <host>ADHostIPAddress</host>

            <user-name>ADHostUserName</user-name>

            <password>ADHostPassword</password>

      </target>

       

      the full adapter response looks like below:

      <active-directory-response>

        <metadata>

          <status>success</status>

        </metadata>

        <target-output host="110.110.110.110">              # (I replaced the ip address with a fictional)

          <metadata>

            <os-id>Windows Server 2008</os-id>    

            <os-version>6.1.7601</os-version>

            <status>success</status>

          </metadata>

          <commands-output>

            <command-output>

              <metadata>

                <command>dsmod user  "CN=FirstName LastName,CN=Users,DC=domainname,DC=companyname,DC=se" -disabled no</command>  # (replaced values with fictional)

                <line-count>6</line-count>

                <execution-milliseconds>5540</execution-milliseconds>

                <exit-code>-2147024809</exit-code>

                <status>error</status>

                <error>Exit code indicates error</error>

              </metadata>

              <output>

                <line index="1">Copyright 2010 BMC Software Ltd, Version: 1.5  </line>

                <line index="2">Connecting to remote service...</line>

                <line index="3">Connected to remote host.</line>

                <line index="4">dsmod failed:Value for 'Target object for this command' has incorrect format.</line>

                <line index="5">type dsmod /? for help.</line>

                <line index="6">Remote application exited with code: -2147024809 </line>

              </output>

            </command-output>

          </commands-output>

        </target-output>

      </active-directory-response>

      .

      Does anyone know what the problem could be and how I can solve it?

       

      Regards

      /Jan

        • 1. Re: Microsoft AD Adapter - Enable/Disable User Account fails
          Jan Persson

          Hi,

          I got help from the BMC Support regarding this. They said that I had spaces in the DistinguishedName and needed to parse it.

           

          The solution was to add

          \&quot;  Infront of the Distinguished Name and

          \&quot;  After the Distinguished Name, see below

           

          \&quot;cn=First Last,cn=users,dc=tpmproto,dc=de\&quot;

           

          and then add that string to the AD Adapter call.

           

          I have tried it and it worked as it should this time.

           

          Regards

          /Jan