> For the complete documentation index, see [llms.txt](https://docs.realmjoin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmjoin.com/ja/dev-reference/local-admin-password-management.md).

# ローカル管理者パスワード管理

## 概要

Local Administrator Password Solution (LAPS) は、サポートおよび緊急目的で各 Windows コンピューターに同一の管理者資格情報を使用する問題を解決します。LAPS 単体では、ローカル管理者アカウントに対してランダム生成されたパスワードを作成します。

RealmJoin を使用すると、ローカルサポートまたは大規模なリモートサポート向けに、安全で個別化された管理者アカウントを管理できます。RealmJoin は、顧客の Tenant 内の Azure Key Vault に暗号化されたパスワードを保存し、これらの資格情報へのすべてのアクセスの監査ログを保存します。

RealmJoin の API では、あなたの Tenant 内の指定デバイスに対して「Support Account」（ローカル管理者）を要求できます。参照 [RealmJoin の Swagger 説明](https://customer-api.realmjoin.com/swagger/index.html) して、現在どの操作がサポートされているかを詳しく確認してください。LAPS を RealmJoin で使用するには、RealmJoin Windows Client の展開が必要です。

あなたの環境で LAPS が正しくセットアップされ、デバイスに RealmJoin Windows Client が展開済みであることを前提としています。また、必ず [認証する ](/ja/dev-reference/realmjoin-api/authentication.md)適切な http Authorization ヘッダーを使用して RealmJoin の API へのすべてのリクエストを認証してください。

## Support Account の要求

エンドポイントを使用して、対象デバイスにローカル Support Account を作成するよう RealmJoin に指示します `/laps/request`。リクエストは Application insights を使用してキューに入れられ、可能な限り早く RealmJoin Backend と RealmJoin Windows Client によって処理されます。アカウントが作成/使用可能になったとき。

このエンドポイントは、アカウントの作成にどれくらい時間がかかるかの見積もりを返します。アカウントの準備ができたら、 [こちら](#retrieve-support-account-credentials) 資格情報の問い合わせ方法について。

### 例

次の状況を想定しましょう：

* RealmJoin API の資格情報を取得し、次の形式にエンコード済みです `dC0xMjM0MTIzNDpteVMzY3JldCE=` (Base64)
* 対象デバイスの Entra `deviceId` は `9999dab9-f946-40ee-9a17-2500c8d00878`。これは Entra オブジェクト ID ではないことに注意してください（別の属性です）！

現在、対象デバイスには Support Account が存在しません。

![ローカルアカウント - Support Account を要求する前](/files/be886ed7f1d356195cf8c9cd7420c8626d69c52d)

では、次を作成しましょう **要求**:

ヘッダー:

```http
Authorization: Basic dC0xMjM0MTIzNDpteVMzY3JldCE=
Content-Type: application/json
```

リクエスト / URI:

```http
POST https://customer-api.realmjoin.com/laps/request?deviceID=9999dab9-f946-40ee-9a17-2500c8d00878
```

このエンドポイントはリクエストボディを想定していません。

**レスポンス**

HTTP ステータス: `200` (OK)

ボディ（JSON 表記）:

```json
{
    "estimatedWaitTime": "00:12:31.8215813"
}
```

このレスポンスには、RealmJoin Windows Client がローカル Support Account を作成するまでのおおよその時間が含まれます。この例では、少なくとも 12 分待つことを想定してください。クライアントが長い間確認されていない場合は、 `null` が数値の代わりに見積もりとして返されることがあります。

RealmJoin Windows Client は既定で 30 分ごとにジョブをポーリングします。API が提供する概算は、Windows Client が最後にチェックインした時刻に基づいています。

## Support Account の資格情報を取得

エンドポイント `/laps/retrieve` は、Support Account がすでに作成されているかを確認し、さらにその Support Account の実際の資格情報を取得するために使用されます。

同じものを問い合わせてみましょう `deviceId` の `9999dab9-f946-40ee-9a17-2500c8d00878` 例と同様に [上記](#requesting-a-support-account).

この例では、Support Account（フルネーム: "Local Support Admin Account"）が RealmJoin Windows Client により対象デバイス上に作成されています：

![ローカルアカウント - Support Account の作成に成功しました](/files/1456fe0d94b0e0da11e31d05caba6319f2961b4a)

**リクエスト**

ヘッダー:

```http
Authorization: Basic dC0xMjM0MTIzNDpteVMzY3JldCE=
Content-Type: application/json
```

リクエスト / URI:

```http
POST https://customer-api.realmjoin.com/laps/retrieve?deviceID=9999dab9-f946-40ee-9a17-2500c8d00878
```

このエンドポイントはリクエストボディを想定していません。

**レスポンス**

まだ資格情報が利用可能でない場合、このエンドポイントは HTTP ステータスを返します： `404` （Not Found）と、ボディ内にいくつかの技術的詳細を返します：

ボディ（JSON）

```json
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
    "title": "Not Found",
    "status": 404,
    "traceId": "00-4c56c3cb0f9b394abf934b107b148613-1234b2497e261649-00"
}
```

資格情報の準備ができるまで、引き続き問い合わせることができます。

資格情報が準備できている場合、このエンドポイントは HTTP ステータスを返します： `200` (OK) と資格情報：

ボディ（JSON）

```json
{
    "password": "Upji1234",
    "username": "ADM-5A2F2169",
    "accountExpirationDate": "2021-12-21T02:14:07+00:00"
}
```

これらの資格情報を使用して、たとえば AnyDesk Supporter Client 経由で接続することで、ユーザーにサポートを提供できます。

ご覧のとおり、既定では Support Account の有効期間は限定されており、有効期限後にアクセスが必要な場合は再作成する必要があります。これは、日常の運用作業に高権限の資格情報が残り続けないようにするためです。


---

# 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.realmjoin.com/ja/dev-reference/local-admin-password-management.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.
