VMware {code} Community
BryanAshby
Contributor
Contributor
Jump to solution

SOAP 'Login': Cannot complete login due to an incorrect user name or password

Hello all --

I'm attempting to perform a 'Login' SOAP method, but am receiving a ServerFaultCode with the string of "Cannot complete login due to an incorrect user name or password." The username and password are correct (I can login via HTML or Flash management or via the REST API with the same credentials).

My flow is as follows:

>> Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:vim25">

   <soapenv:Header/>

   <soapenv:Body>

      <urn:RetrieveServiceContent>

         <urn:_this>ServiceInstance</urn:_this>

      </urn:RetrieveServiceContent>

   </soapenv:Body>

</soapenv:Envelope>

<< Response

<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <soapenv:Body>

      <RetrieveServiceContentResponse xmlns="urn:vim25">

         <returnval>

            <rootFolder type="Folder">ha-folder-root</rootFolder>

            <propertyCollector type="PropertyCollector">ha-property-collector</propertyCollector>

            <viewManager type="ViewManager">ViewManager</viewManager>

            <about>

               <name>VMware Workstation</name>

               <fullName>VMware Workstation 14.0.0 build-6661328</fullName>

               <vendor>VMware, Inc.</vendor>

               <version>14.0.0</version>

               <build>6661328</build>

               <localeVersion>INTL</localeVersion>

               <localeBuild></localeBuild>

               <osType>linux-x64</osType>

               <productLineId>ws</productLineId>

               <apiType>HostAgent</apiType>

               <apiVersion>r30428</apiVersion>

               <licenseProductName>VMware Workstation</licenseProductName>

               <licenseProductVersion>14.0</licenseProductVersion>

            </about>

            <setting type="OptionManager">HostAgentSettings</setting>

            <userDirectory type="UserDirectory">ha-user-directory</userDirectory>

            <sessionManager type="SessionManager">ha-sessionmgr</sessionManager>

            <authorizationManager type="AuthorizationManager">ha-authmgr</authorizationManager>

            <eventManager type="EventManager">ha-eventmgr</eventManager>

            <taskManager type="TaskManager">ha-taskmgr</taskManager>

            <diagnosticManager type="DiagnosticManager">ha-diagnosticmgr</diagnosticManager>

            <licenseManager type="LicenseManager">ha-license-manager</licenseManager>

            <searchIndex type="SearchIndex">ha-searchindex</searchIndex>

            <fileManager type="FileManager">ha-nfc-file-manager</fileManager>

            <ovfManager type="OvfManager">ha-ovf-manager</ovfManager>

            <localizationManager type="LocalizationManager">ha-l10n-manager</localizationManager>

            <storageResourceManager type="StorageResourceManager">ha-storage-resource-manager</storageResourceManager>

         </returnval>

      </RetrieveServiceContentResponse>

   </soapenv:Body>

</soapenv:Envelope>

>> Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:vim25">

   <soapenv:Header/>

   <soapenv:Body>

      <urn:Login>

         <urn:_this type="SessionManager">ha-sessionmgr</urn:_this>

         <urn:userName>administrator@myhost.com</urn:userName>

         <urn:password>supersecretpassword</urn:password>

      </urn:Login>

   </soapenv:Body>

</soapenv:Envelope>

<< Response

<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>ServerFaultCode</faultcode>

         <faultstring>Cannot complete login due to an incorrect user name or password.</faultstring>

         <detail>

            <InvalidLoginFault xsi:type="InvalidLogin" xmlns="urn:vim25"/>

         </detail>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

Can someone point out what's wrong here? Everything seems OK according to docs.

Thanks for any help!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
BryanAshby
Contributor
Contributor
Jump to solution

Turns out I had the wrong endpoint being utilized in the RetrieveServiceContentResponse and Login POSTs :smileyalert:. Fixing this results in a successful login.

View solution in original post

0 Kudos
1 Reply
BryanAshby
Contributor
Contributor
Jump to solution

Turns out I had the wrong endpoint being utilized in the RetrieveServiceContentResponse and Login POSTs :smileyalert:. Fixing this results in a successful login.

0 Kudos