> ## Documentation Index
> Fetch the complete documentation index at: https://translations.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# テナントログのエージェント ID

> `agent_id` または `external_agent_id` を使用して、Auth0 テナントログ内のエージェントアクティビティを追跡します。

export const ReleaseStageNotice = ({feature, stage, plans, contact, terms}) => {
  const stageTextMap = {
    "beta": "Beta",
    "ea": "早期アクセス"
  };
  const stageText = stageTextMap[stage] || "製品リリース段階";
  const prsLink = "/docs/troubleshoot/product-lifecycle/product-release-stages";
  const linkify = (text, url) => {
    return <a href={url} target="_blank" rel="noreferrer" class="link">{text}</a>;
  };
  const includeDetails = (plans, contact, terms) => {
    const hasDetails = terms || plans || contact;
    if (!hasDetails) return null;
    return <span data-as="p">
            {plans && <>この機能は{linkify(`${plans}プラン`, "https://auth0.com/pricing")}でご利用いただけます。 </>}
            {contact && "参加をご希望の場合は、" + contact + "までお問い合わせください。 "}
            {terms && <>この機能を使用することにより、Oktaの該当する無料トライアル規約および{linkify("Master Subscription Agreement", "https://www.okta.com/legal")}に同意したものとみなされます。</>}
        </span>;
  };
  return <Warning>
            <span data-as="p">
                <strong>{feature}機能は現在、{linkify(stageText, prsLink)}です。</strong>
            </span>

            {includeDetails(plans, contact, terms)}
        </Warning>;
};

<ReleaseStageNotice feature="エージェントをプリンシパルとして使用" stage="ea" contact="Auth0 Support" terms="true" />

エージェントによるインタラクション用にトークンが発行されると、Auth0 は、設定されている場合、生成されるテナントログエントリに `agent_id` と `external_agent_id` の両方を含めます。

<div id="supported-grant-types">
  ## サポート対象のグラントタイプ
</div>

Auth0 では、以下のグラントタイプについて、ログに エージェント のアイデンティティが記録されます。

* エージェント にリンクされたクライアントからの `client_credentials` グラント
* エージェント にリンクされたクライアントの `refresh_token` グラント
* OBO トークン交換グラント
* クライアントが エージェント にリンクされている標準のログイングラント

<div id="query-logs">
  ## ログをクエリする
</div>

Management API のログエンドポイントを使用して `agent_id` をクエリすることで、エージェントごとの監査と異常検知を行えます。

```http theme={null}
GET /api/v2/logs?q=agent_id:agt_72jbvv7LfRKYp59gtRLtkn
```

テナントログのクエリとストリーミングについて詳しくは、[ログ検索クエリの構文](/docs/ja-jp/deploy-monitor/logs/log-search-query-syntax)および[ログストリーム](/docs/ja-jp/customize/log-streams)を参照してください。
