> 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 サイトを参照し、それがアクティブかアーカイブ済みか、ロックされているか、そしてテナントのごみ箱内にあるかを報告します。アカウントがすでに削除されているユーザーにも対応します。OneDrive がまだごみ箱に残っている可能性があるためです。変更は一切行いません。

### 一般的な使用例

* アクティブなユーザーの OneDrive がプロビジョニングされているかどうか、またプロビジョニングされている場合はロックされているかアーカイブ済みかを確認します。
* 削除済みユーザーの OneDrive がまだテナントのごみ箱に存在するかどうか、およびいつ完全削除される予定かを確認します。

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

* `UserPrincipalName` アクティブなユーザーだけでなく、すでに削除されたアカウントの 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 管理センターに対する Connect-PnPOnline と、任意のサイト コレクション（OneDrive 個人用サイトおよびテナントのごみ箱を含む）を列挙/検査し、より下位の Sites.Read.All / Sites.ReadWrite.All アプリケーション スコープでは公開されない tenant-admin コマンドレット Get-PnPTenantSite と Get-PnPTenantDeletedSite に必要です。Get-PnPUserProfileProperty と Get-PnPWeb もこの権限でカバーされます。*

#### アクセス許可に関する注意

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

### パラメーター

#### UserPrincipalName

OneDrive が確認されるユーザーのユーザー プリンシパル名。削除済みユーザーも受け入れられます。

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

[Runbook リファレンスの概要に戻る](/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.
