> 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/penetorshontesuto/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 %}
**Verify をクリック**

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

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

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

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

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

置き換えてください `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/penetorshontesuto/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.
