function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Migration tool login error

Hi i am trying to use the migration tool and i get the error invalid user name or password or security token although i am sure the information provided is correct i even reset the security token and tried umpteen number of times but the same error persists




# Specify the login credentials for the desired Salesforce organization

sf.username = username
sf.password = password

sf.serverurl =

#sf.pkgName = <Insert comma separated package names to be retrieved>

#sf.zipFile = <Insert path of the zipfile to be retrieved>

#sf.metadataType = <Insert metadata type name for which listMetadata or bulkRetrieve operations are to be performed>

# Use '' for production or developer edition (the default if not specified).

# Use ' for sandbox.
sf.serverurl =

# If your network requires an HTTP proxy,see for configuration.



Can you please tell me what it is that i am doing wrong


Look in your login history (in the browser). Does it show a failed login attempt? If not, you require a proxy and/or you're not reaching the server, or your username is incorrect. If you do see a login attempt failure, then it will tell you if it is the password or security token. Note that your configuration file should contain the password and security token without a space between.

Abhay AroraAbhay Arora

<project name="Sample usage of Salesforce Ant tasks" default="deployCode" basedir="." xmlns:sf="antlib:com.salesforce">
    <!-- Setting up the properties -->
    <property file=""/>
    <property environment="env"/>
    <!-- Clean Up the existing folder -->
    <target name="clean">
        <delete dir="projectFolder" />

    <target name="deployCode">
Above is my build.xml check your login history if your credentials are correct..

 put all my code in projectFolder along with the package.xml file




From my recollection, everything looks good in your build.xml. Check your file and make sure the correct credentials and  serverURL are in place.