> For the complete documentation index, see [llms.txt](https://docs-embed.anyflow.jp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-embed.anyflow.jp/connectors/notes/salesforce_firsttime_error.md).

# Salesforceコネクタの初回認証時エラーの対応方法

## 概要

Salesforceコネクタからの認証（コネクションの作成）をする際、Salesforce側に「Anyflow Embed」コネクタをインストールする操作が必要です。

本設定は、2026年3月のSalesforceの OAuth 接続アプリケーションのセキュリティ基準の変更に影響するものです。この変更以降、新規でAnyflow Embedをインストールする場合に必ず発生する手順となります。\
正式な内容につきましては、公式にて公開されている下記の情報も併せて参照してください。\
参照：[Prepare for Connected App Usage Restrictions Change](https://help.salesforce.com/s/articleView?id=005132365\&type=1)

### 参考：発生するエラー

<mark style="color:red;">**`OAUTH_APPROVAL_ERROR_GENERIC`**</mark> が含まれるエラーメッセージが表示されます。

<figure><img src="/files/CUgkWxAoaiUzKlMSCNuA" alt="" width="375"><figcaption></figcaption></figure>

### 手順

以下の手順が完了後、Anyflow Embedにて正常に認証（コネクションの作成）することができるようになります。

**①AnyflowEmbedの認証に利用するSalesforceユーザーの権限の付与状況を確認する**

* 新しい接続アプリケーションをインストールするために必要なユーザー権限 (**「アプリケーションのカスタマイズ」**&#x304A;よ&#x3073;**「すべてのデータの編集」**&#x307E;た&#x306F;**「接続アプリケーションの管理」**)
* **インストールされていない接続アプリケーションを承認**

{% hint style="warning" %}

## 接続先のSalesforceがsandboxの場合

[公式情報](https://help.salesforce.com/s/articleView?id=005132365\&type=1)による&#x3068;**「更新なしで本番環境ライセンスをサンドボックスに一致させる」**&#x30C4;ールを実行することが推奨されています。詳細はSalesforce公式の情報をご確認ください。[ツール詳細](https://help.salesforce.com/s/articleView?id=000386961\&type=1\&language=en_US)　
{% endhint %}

**②Anyflow Embed上で接続（コネクションの作成）を行う**

* ①の権限が付与されているユーザーで操作を行なってください。

**③Salesforceの接続アプリケーションの OAuth 利用状況から「Anyflow Embed」をインストールする**

* Salesforceの「設定」から「接続アプリケーションのOAuth利用状況」 に移動する
* 一覧から「Anyflow Embed」を探し、アクション列にある「インストール」ボタンを押下する。

<figure><img src="/files/PEX21W2nWY0S8myTCwQC" alt=""><figcaption></figcaption></figure>

## よくあるご質問

### セキュリティ管理が厳しく、認証するユーザーに必要権限を付与することが難しい

手順①の権限が必須なのは、そのSalesforce組織で初めて認証（コネクションの作成）を行うユーザーにのみで、2回目以降認証を行うユーザーには、付与されていなくても問題ありません。\
以下などの対応をお試しください。

* &#x20;初回認証のみをシステム管理者権限を持つ方に行なっていただき、その後削除する
* 初回認証時のみ一時的に権限を付与してもらい、初回認証完了後、権限を修正する<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-embed.anyflow.jp/connectors/notes/salesforce_firsttime_error.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
