---
schema_version: "1"
id: 628ecadec07835c01115aff4ae7eaea5291f5a4aafb82ea08e3e0168db1cb34e
title: Entering Salesforce Connection Information
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-migration-guide/guides/daas/forcemigrationtool-connect.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-migration-guide/guide/forcemigrationtool-connect.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: df0817be1a88c35093b0a2890264cac38eb45b2098693ac4c75802f0e1ebe00f
products:
  - Ant Migration Tool Guide
  - Platform Developer Content
---

# Entering Salesforce Connection Information

**note:** The Ant Migration Tool is retired with Spring ’24. The tool continues to function as-is for future API versions but isn’t updated with new functionality and isn’t supported.  If Salesforce adds a new feature that is incompatible with Ant, the Ant Migration Tool won't be updated to support it. To manage metadata changes, switch to Salesforce CLI for a modern, supported developer experience.

To retrieve or deploy metadata components, you need to edit build.properties to point to a Salesforce org.

1.  Go to the location where you extracted the Ant Migration Tool files and open the sample subdirectory.
2.  Open `build.properties` in a text editor and do either of the following.

    -   To use a username and password for login, substitute a valid Salesforce username and password. If you’re using a security token, paste the 25-digit token value at the end of your password.
    -   To use an active Salesforce session for login, uncomment the `sf.sessionId` property and substitute a valid session ID. Also, make sure to comment out the `sf.username` and `sf.password` properties.
    -   To use an OAuth access token for login, uncomment the `sf.sessionId` property and supply the access token. Also, make sure to comment out the `sf.username` and `sf.password` properties.

|Parameter|Value|
|---------|-----|
|`sf.username`|The Salesforce username for login. The username associated with this connection must have the Modify Metadata through Metadata API Functions permission.  When connecting to a sandbox instance, your sandbox name is appended to your username. For example, if your production username is `foo@salesforce.com`, and one of your sandboxes is called `bar`, your sandbox username is `foo@salesforce.com.bar`.|
|`sf.password`|The password you use to log in to the org associated with this project. If you are using a security token, paste the 25-digit token value to the end of your password.|
|`sf.serverurl`|The salesforce server URL. Use `https://login.salesforce.com` to connect to a production or Developer Edition org. To connect to a sandbox instance, change this to `https://test.salesforce.com`.|
|`sf.sessionId`|The ID of an active Salesforce session or the OAuth access token. A session is created after a user logs in to Salesforce successfully with a username and password. Use a session ID for logging in to an existing session instead of creating a new session. Alternatively, use an access token for OAuth authentication. For more information, see [Authenticating Apps with OAuth](https://help.salesforce.com/apex/HTViewHelpDoc?id=remoteaccess_authenticate.htm) in the Salesforce Help.|

**note:** In the build.properties file, you can specify values for either the `sf.username` and `sf.password` property pair, or the `sf.sessionId` property, but not both. In the build.xml file, your targets can contain all three parameters (`username`, `password`, and `sessionId`). Either the username and password or the session ID will be used for authentication.

