Memos About Salesforce

Salesforceにハマってたこと!

Salesforce Ant Tool ログイン ユーザ名、パスワード、セキュリティトークンが無効か、ユーザがロックされています

こんにちは、管理人の@Salesforce.Zです。

Ant Toolでリリースやオブジェクト構築を使うことにできる。

別の記事Ant 移行ツール でデプロイを紹介しました。

しかし、ログイン時点でエラーが発生する場合もある

たとえば、「ユーザ名、パスワード、セキュリティトークンが無効か、ユーザがロックされています

自分の場合の対策を共有します。

読んだら得ること

★ Ant Toolでリリース、ログインエラーの対策

目次

Ant ツールでデプロイ時

build.propertiesファイルを用意する

サンプルbuild.propertiesファイル

# build.properties
#

Specify the login credentials for the desired Salesforce organization

sf.username = <Insert your Salesforce username here> sf.password = <Insert your Salesforce password here>

sf.sessionId = <Insert your Salesforce session id here. Use this or username/password above. Cannot use both>

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 'https://login.salesforce.com' for production or developer edition (the default if not specified).

Use 'https://test.salesforce.com for sandbox.

sf.serverurl = https://login.salesforce.com

sf.maxPoll = 20

If your network requires an HTTP proxy, see http://ant.apache.org/manual/proxy.html for configuration.

遭った問題

ユーザ名、パスワード、セキュリティトークンが無効か、ユーザがロックされています

対策

・パスワードにセキュリティートークンをくっつける

・ログインURLを見直す(test環境か本番環境か)  本番環境は自分のインスタンスをloginに置き換える

リファレンス

Salesforce の接続情報の入力

Ant 移行ツール の使用