ターゲットが SalesForce 準本番環境の場合、SalesForce スポークの OAuth トークンを取得すると、「invalid_grant、ユーザーはこのコンシューマーを承認していません」というエラーが返されます。Issue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } 次のドキュメントを使用して、インスタンスで SalesForce スポークを構成しました。 https://docs.servicenow.com/csh?topicname=setup-salesforce.html&version=latest 次に、次の手順を使用して、SalesForceのOAuthトークンを手動で取得することをテストします。 [Connections & Credentials] [> Credentials] に移動します。作成した「SalesForce」認証情報を選択します。関連リンク [OAuth トークンの取得] をクリックします ただし、「OAuth フローが失敗しました。構成を確認して、もう一度やり直してください。エラーの詳細:invalid_grant、ユーザーがこのコンシューマーを承認していません」 Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } サポートされているすべての ServiceNow リリース。Sub-Production ターゲットの SalesForce 環境。 Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } SalesForce の OAuth アプリケーションレジストリレコードに設定されたトークン URL が正しくありません。トークンURL「https://login.salesforce.com/services/oauth2/token」は、SalesForce本番環境でのみ予約されています。セットアップでは準本番環境の SalesForce 環境が使用されるため、トークン URL は機能しません。 SalesForceは、本番環境と準本番環境のトークンURLを分離します。このセットアップは準本番環境の SalesForce 環境を使用するように構成されているため、正しい「トークン URL」は「https://test.salesforce.com/services/oauth2/token」です。 Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } 次の手順を使用して、SalesForce の OAuth アプリケーションレジストリのトークン URL 値を変更します。 [システム OAuth (System OAuth)] を [アプリケーションレジストリ] >ナビゲートします。SalesForce アプリケーションレジストリレコードを開きます。[トークン URL] フィールドの変更に進みます。 移動元: 「https://login.salesforce.com/services/oauth2/token」 To: 「https://test.salesforce.com/services/oauth2/token」 この変更により、問題が解決されます。