> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/docs/docs-ja/pentesuto/configure-a-pentest/domain-verification/azure-apim.md).

# Azure API Management のドメイン確認

Azure API Management (APIM) にホストされているドメインを検証するには、通常 `azure-api.net`、ペンテストでは、以下の手順を完了します。

APIM では静的ファイルを直接アップロードできないため、代わりに `aikido.txt` ファイルをホストする代わりに、Aikido が `/aikido.txt`.

{% stepper %}
{% step %}
**検証プロセスを開始する**

ペンテストのオンボーディングフローの最終ステップに進み、そこでドメイン検証を設定できます。
{% endstep %}

{% step %}
**「検証」をクリック**

Azure APIM のドメインを見つけて［確認］をクリックします。これでファイルアップロードの検証フローが開始されます。
{% endstep %}

{% step %}
**検証コードをコピーする**

Aikido に表示される検証コードをコピーします。次の手順で、このコードを APIM ポリシーに貼り付けます。
{% endstep %}

{% step %}
**API にインバウンド ポリシーを追加する**

Azure ポータルで API Management インスタンスを開き、 **APIs**、確認したいドメインを提供している API を選択し、 **Design** タブを開きます。以下の **インバウンド処理** セクションで、コード エディター（`</>`）をクリックし、ポリシーを以下のスニペットに置き換えます。

置き換えてください `AIKIDO_DOMAIN_VALIDATION_TOKEN_HERE` を Aikido からコピーした検証コードに置き換えます。

```xml
<policies>
  <inbound>
    <base />
    <choose>
      <when condition="@(context.Request.OriginalUrl.Path == "/aikido.txt")">
        <return-response>
          <set-status code="200" reason="OK" />
          <set-header name="Content-Type" exists-action="override">
            <value>text/plain</value>
          </set-header>
          <set-body>AIKIDO_DOMAIN_VALIDATION_TOKEN_HERE</set-body>
        </return-response>
      </when>
    </choose>
  </inbound>
  <backend>
    <base />
  </backend>
  <outbound>
    <base />
  </outbound>
</policies>
```

ポリシーを保存して、反映させます。
{% endstep %}

{% step %}
**検証成功**

検証に成功すると、Aikido に確認のトーストが表示されます。その後、もう不要であれば `<when>` ブロックをポリシーから削除できます。
{% endstep %}
{% endstepper %}


---

# 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://help.aikido.dev/docs/docs-ja/pentesuto/configure-a-pentest/domain-verification/azure-apim.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.
