> 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/general/office365-license-report.md).

# Office 365 ライセンス レポート

Microsoft 365 のライセンス使用状況と利用可能数をレポート

### 説明

Tenant 内の Microsoft 365 ライセンスのレポートを作成し、使用中の数と空き数を示します。共有メールボックスのライセンスなど、Exchange Online の詳細を追加できます。レポート ファイルは Azure Storage Account に、個別ファイルとして、または 1 つの ZIP として、ダウンロード リンク付きでアップロードできます。実際のユーザー データが要求されない限り、何も変更されません。要求された場合は、レポートのプライバシー設定を一時的にオフにして、その後元に戻します。

### エクスポート用の Storage Account を構成します

レポート ファイルは Azure Storage Account にアップロードされます。サブスクリプション、リソース グループ、および名前は下の Tenant 設定から取得されます。コンテナー名は次から取得されます `OfficeLicensingReport.Container`。この runbook のスイッチは、 `OfficeLicensingReport.*` 設定にも対応しているため、既定値を Tenant ごとに固定できます。

```json
{
	"Settings": {
		"OfficeLicensingReport": {
			"ResourceGroup": "rj-test-runbooks-01",
			"SubscriptionId": "00000000-0000-0000-0000-000000000000",
			"StorageAccount": {
				"Name": "rbexports01"
			}
		}
	}
}
```

ランブックのカスタマイズ方法の詳細については、 [ランブック カスタマイズ ガイド](https://docs.realmjoin.com/automation/runbooks/runbook-customization).

### 場所

組織 → 全般 → Office365 License Report

**完全な Runbook 名**

rjgit-org\_general\_office365-license-report

### 詳細

| プロパティ    | 値                                                                                                           |
| -------- | ----------------------------------------------------------------------------------------------------------- |
| バージョン    | 1.1.3                                                                                                       |
| 必須モジュール  | <p>RealmJoin.RunbookHelper (>= 0.8.10)<br>Az.Accounts (>= 5.5.2)<br>ExchangeOnlineManagement (>= 3.9.2)</p> |
| スケジュール可能 | いいえ                                                                                                         |

### 権限

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

* **種類**: Microsoft Graph
  * Reports.Read.All
    * */reports から Office 365 の使用状況およびアクティビティ レポート CSV を取得します*
  * Directory.Read.All
    * */subscribedSkus とグループのライセンス割り当てを SKU の概要用に読み取ります*
  * User.Read.All
    * *ユーザーを一覧表示し、ユーザーごとのレポートのためにそのライセンス詳細を読み取ります*
  * ReportSettings.ReadWrite.All
    * *includeUserData が有効な場合は、非表示のレポート名を一時的に無効にし、その後設定を復元します*
  * AuditLog.Read.All *（任意 — 機能: サインイン エクスポート）*
    * *exportToFile が有効な場合（既定でオン）、アプリごとのサインイン エクスポートのために /auditLogs/signIns を読み取ります*
* **種類**： Office 365 Exchange Online
  * Exchange.ManageAsApp *（任意 — 機能: Exchange ライセンス レポート）*
    * *includeExchange が有効な場合、共有メールボックスのライセンス レポートのために Get-EXOMailbox を実行します*

#### RBAC ロール

* Exchange 管理者
  * *includeExchange が有効な場合のアプリ専用 Exchange Online セッションに必要です*

### パラメーター

#### printOverview

実行出力に、ライセンス SKU ごとの合計、使用中、利用可能、一時停止の件数を表で出力します。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | True  |
| 種類    | ブール値  |

#### includeExchange

共有メールボックスのライセンスなどの Exchange Online レポートを追加します。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | False |
| 種類    | ブール値  |

#### includeUserData

実行中にレポートのプライバシー設定をオフにして、アクティビティ レポートに実際のユーザー名を表示します。後で設定は復元されます。そのためレポートには個人データが含まれますので、まずデータ保護規則を確認してください。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | False |
| 種類    | ブール値  |

#### exportToFile

レポート ファイルを、Tenant 設定で構成された Azure Storage Account にアップロードします。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | True  |
| 種類    | ブール値  |

#### exportAsZip

個別のレポート ファイルの代わりに、1 つの ZIP ファイルをアップロードします。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | False |
| 種類    | ブール値  |

#### produceLinks

アップロードされたファイルの、期限付きダウンロード リンクを返します。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | True  |
| 種類    | ブール値  |

#### コンテナー名

レポート ファイルがアップロードされる Storage container。Tenant 設定の OfficeLicensingReport.Container から取得されます。

| プロパティ | 値                        |
| ----- | ------------------------ |
| 必須    | false                    |
| 既定値   | rjrb-licensing-report-v2 |
| 種類    | 文字列                      |

#### リソース グループ名

Storage Account のリソース グループ。Tenant 設定の OfficeLicensingReport.ResourceGroup から取得されます。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   |       |
| 種類    | 文字列   |

#### Storage Account 名

エクスポート用の Storage Account。Tenant 設定の OfficeLicensingReport.StorageAccount.Name から取得されます。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   |       |
| 種類    | 文字列   |

#### サブスクリプション ID

Storage Account を保持する Azure サブスクリプション。Tenant 設定の OfficeLicensingReport.SubscriptionId から取得されます。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   |       |
| 種類    | 文字列   |

[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/general/office365-license-report.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.
