> 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/zi-dong-hua/runbooks/runbook-references/org/collab/check-onedrive-status.md).

# OneDrive の状態を確認

ユーザーの OneDrive がアクティブ、ロック中、または削除済みかどうかを確認

### 説明

ユーザーの個人用 OneDrive サイトを検索し、アクティブかアーカイブ済みか、ロックされているか、Tenant のごみ箱にあるかを報告します。アカウントがすでに削除されたユーザーにも対応しており、その OneDrive がまだごみ箱に残っている可能性があるためです。変更は一切行いません。

### 一般的な使用例

* アクティブなユーザーの OneDrive がプロビジョニングされているか、またそうであればロックされているかアーカイブ済みかを確認します。
* 削除済みユーザーの OneDrive がまだ Tenant のごみ箱に存在するか、またいつ完全削除される予定かを確認します。

### パラメーターの動作

* `ユーザー プリンシパル名` アクティブなユーザーだけでなく、すでに削除されたアカウントの UPN も受け付けます。これは意図的なものです。ユーザー ピッカーでは削除済みアカウントを選択できないため、このパラメーターはピッカーではなく自由入力です。
* 削除済みユーザーの場合、ごみ箱の検索は削除されたサイトの `SiteOwnerEmail` に一致します。値が欠落している場合や、以前に UPN が変更されている場合、誤って「見つかりません」という結果になることがあります。

この Runbook は完全に読み取り専用であり、Tenant に変更を加えません。

### 場所

組織 → Collab → OneDrive の状態を確認

**完全な Runbook 名**

rjgit-org\_collab\_check-onedrive-status

### 詳細

| プロパティ    | 値                                                                       |
| -------- | ----------------------------------------------------------------------- |
| バージョン    | 1.5.0                                                                   |
| 必須モジュール  | <p>RealmJoin.RunbookHelper (>= 0.8.10)<br>PnP.PowerShell (>= 3.4.1)</p> |
| スケジュール可能 | いいえ                                                                     |

### アクセス許可

#### アプリケーションのアクセス許可

* **型**: Office 365 SharePoint Online
  * Sites.FullControl.All
    * *SharePoint admin center に対する Connect-PnPOnline と、Tenant 管理用の cmdlet である Get-PnPTenantSite および Get-PnPTenantDeletedSite に必要です。これらは任意のサイト コレクション（OneDrive 個人サイトや Tenant のごみ箱を含む）を列挙/検査しますが、より下位の Sites.Read.All / Sites.ReadWrite.All アプリケーション スコープでは公開されていません。Get-PnPUserProfileProperty と Get-PnPWeb もこの権限付与の対象です。*

#### 権限に関する注意事項

SharePoint Online: Automation アカウントのシステム割り当てマネージド ID に、Office 365 SharePoint Online API (AppId 00000003-0000-0ff1-ce00-000000000000) 上で 'Sites.FullControl.All' アプリケーション権限を付与します。この SharePoint のアプリ専用の付与は、Microsoft Graph で使われる標準的な Entra のアプリ ロール割り当て自動化では実行できず、Tenant ごとに手動で割り当てる必要があります（例: SharePoint admin center、またはマネージド ID 向けの Grant-PnPAzureADAppSitePermission 相当の方法）。

### パラメーター

#### ユーザー プリンシパル名

OneDrive を確認するユーザーの User Principal Name です。削除済みユーザーも受け付けます。

| プロパティ    | 値            |
| -------- | ------------ |
| 必須       | true         |
| 既定値      |              |
| 型        | 文字列          |
| ポータルの表示名 | ユーザー プリンシパル名 |

[Runbook リファレンスの概要に戻る](https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/runbook-references.md)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/runbook-references/org/collab/check-onedrive-status.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
