LoginSignup
2
1

More than 5 years have passed since last update.

Microsoft Graph を使ってみよう : レポートリソース

Last updated at Posted at 2018-05-22

レポートリソース

Microsoft Graph の主な利用方法は個人からその関連を見ることですが、全体の情報として Office 365 の使用状況を見ることも出来ます。

以下のような情報が取得できます。

  • Microsoft Teams ユーザーアクティビティ
  • Microsoft Teams デバイスの使用状況
  • Outlook アクティビティ
  • Outlook アプリの使用状況
  • Outlook メールボックスの使用状況
  • Office 365 のライセンス認証
  • Office 365 のアクティブなユーザー
  • Office 365 グループアクティビティ
  • OneDrive アクティビティ
  • OneDrive の使用状況
  • SharePoint アクティビティ
  • SharePoint サイトの使用状況
  • Skype for Business アクティビティ
  • Skype for Business デバイスの使用状況
  • Skype for Business 開催者アクティビティ
  • Skype for Business 参加者アクティビティ
  • Skype for Business ピアツーピアアクティビティ
  • Yammer アクティビティ
  • Yammer デバイスの使用状況
  • Yammer グループアクティビティ

それぞれ似た情報が取得できます。具体例としてここではいくつか見ていきます。

注意点

  • 全体の情報を取得するため管理者のアクセス許可が必須です。
  • 現在 Graph エクスプローラーではレポート機能は試せません。
  • C# SDK でレポートを取得できません。これは結果が他の Graph API と異なり Redirect および CSV であるからと推測しますが、問題が解決するまで HttpClient を使ってください。

Microsoft Teams ユーザーアクティビティ

Teams におけるアクティビティを取得します。

ユーザーの詳細を取得する
以下の例は過去 7 日間のユーザー毎のアクティビティを取得します。結果は CSV 形式です。引数は期間 (period) から日付 (date) を渡せます。

period: レポートを集計する期間の長さです。値は D7、D30、D90、D180 です。
date: YYYY-MM-DD の形式にします。 過去 30 日間のみ指定可能。

GET: https://graph.microsoft.com/v1.0/reports/getTeamsUserActivityUserDetail(period='D7')

以下のような結果が取得できます。

Report Refresh Date User Principal Name Last Activity Date Is Deleted Deleted Date Assigned Products Team Chat Message Count Private Chat Message Count Call Count Meeting Count Has Other Action Report Period
2018-05-18 admin@graphdemo01.onmicrosoft.com 2018-05-18 False AZURE ACTIVE DIRECTORY PREMIUM P1+OFFICE 365 ENTERPRISE E3 1 0 0 0 Yes 7
2018-05-18 manager1@graphdemo01.onmicrosoft.com 2018-05-18 False AZURE ACTIVE DIRECTORY PREMIUM P1+OFFICE 365 ENTERPRISE E3 0 0 0 0 Yes 7
2018-05-18 sampleuser1@graphdemo01.onmicrosoft.com False AZURE ACTIVE DIRECTORY PREMIUM P1+OFFICE 365 ENTERPRISE E3 0 0 0 0 No 7

ユーザーの数を取得する

GET: https://graph.microsoft.com/v1.0/reports/getTeamsUserActivityUserCounts(period='D7')

以下のような結果が返ってきます。

Report Refresh Date Report Date Team Chat Messages Private Chat Messages Calls Meetings Other Actions Report Period
2018-05-18 2018-05-18 1 0 0 0 2 7
2018-05-18 2018-05-17 0 0 0 0 0 7
2018-05-18 2018-05-16 0 0 0 0 0 7
2018-05-18 2018-05-15 0 0 0 0 0 7
2018-05-18 2018-05-14 0 0 0 0 0 7
2018-05-18 2018-05-13 0 0 0 0 0 7
2018-05-18 2018-05-12 0 0 0 0 0 7

アクティビティの数を取得する

GET: https://graph.microsoft.com/v1.0/reports/getTeamsUserActivityCounts(period='D7')

以下のような結果が返ってきます。

Report Refresh Date Report Date Team Chat Messages Private Chat Messages Calls Meetings Report Period
2018-05-18 2018-05-18 1 0 0 0 7
2018-05-18 2018-05-17 0 0 0 0 7
2018-05-18 2018-05-16 0 0 0 0 7
2018-05-18 2018-05-15 0 0 0 0 7
2018-05-18 2018-05-14 0 0 0 0 7
2018-05-18 2018-05-13 0 0 0 0 7
2018-05-18 2018-05-12 0 0 0 0 7

Outlook メールボックスの使用状況

主にメールの送受信に基づき、ユーザーとアクティビティを取得します。費するストレージの量、ストレージのクォータに近いメールボックスの数も確認できます。

メールボックスの数を取得する

GET: https://graph.microsoft.com/v1.0/reports/getMailboxUsageMailboxCounts(period='D7')

以下のような結果が返ってきます。

Report Refresh Date Total Active Report Date Report Period
2018-05-17 3 2018-05-17 7
2018-05-17 3 2018-05-16 7
2018-05-17 1 1 2018-05-15 7
2018-05-17 1 1 2018-05-14 7
2018-05-17 1 2018-05-13 7
2018-05-17 1 2018-05-12 7
2018-05-17 1 2018-05-11 7

** ストレージを確認する**

GET: https://graph.microsoft.com/v1.0/reports/getMailboxUsageStorage(period='D7')

以下のような結果が返ってきます。

Report Refresh Date Storage Used (Byte) Report Date Report Period
2018-05-17 16772553 2018-05-17 7
2018-05-17 16558422 2018-05-16 7
2018-05-17 5696762 2018-05-15 7
2018-05-17 4235494 2018-05-14 7
2018-05-17 4139743 2018-05-13 7
2018-05-17 4090356 2018-05-12 7
2018-05-17 4054411 2018-05-11 7

Office 365 のライセンス認証

1 つ以上のデバイスで Office 365 サブスクリプションをアクティブ化したユーザーを確認できます。

ライセンス認証の数を取得

GET: https://graph.microsoft.com/v1.0/reports/getOffice365ActivationCounts

以下のような結果が返ってきます。

Report Refresh Date Product Type Windows Mac Android iOS Windows 10 Mobile
2018-05-18 Office 365 ProPlus 0 0 0 0 0

ユーザーの数を取得

GET: https://graph.microsoft.com/v1.0/reports/getOffice365ActivationsUserCounts

以下のような結果が返ってきます。

Report Refresh Date Product Type Assigned Activated
2018-05-18 Office 365 ProPlus 3 0

OneDrive の使用状況

組織内の OneDrive アカウント全体で使用したファイルの合計数、ストレージなど取得可能。

ファイル数を取得する

GET: https://graph.microsoft.com/v1.0/reports/getOneDriveUsageFileCounts(period='D7')

以下のような結果が返ってきます。

Report Refresh Date Site Type Total Active Report Date Report Period
2018-05-18 All 17 13 2018-05-18 7
2018-05-18 All 10 6 2018-05-17 7
2018-05-18 All 6 1 2018-05-16 7
2018-05-18 All 2 3 2018-05-15 7
2018-05-18 All 0 0 2018-05-14 7
2018-05-18 All 0 0 2018-05-13 7
2018-05-18 All 0 0 2018-05-12 7

ストレージを取得する

GET: https://graph.microsoft.com/v1.0/reports/getOneDriveUsageStorage(period='D7')

以下のような結果が返ってきます。

Report Refresh Date Site Type Storage Used (Byte) Report Date Report Period
2018-05-18 OneDrive 14644091 2018-05-18 7
2018-05-18 All 14644091 2018-05-18 7
2018-05-18 OneDrive 13842341 2018-05-17 7
2018-05-18 All 13842341 2018-05-17 7
2018-05-18 OneDrive 10414845 2018-05-16 7
2018-05-18 All 10414845 2018-05-16 7
2018-05-18 OneDrive 1972512 2018-05-15 7
2018-05-18 All 1972512 2018-05-15 7
2018-05-18 OneDrive 1674226 2018-05-14 7
2018-05-18 All 1674226 2018-05-14 7
2018-05-18 OneDrive 1674226 2018-05-13 7
2018-05-18 All 1674226 2018-05-13 7
2018-05-18 OneDrive 1674226 2018-05-12 7
2018-05-18 All 1674226 2018-05-12 7

管理者ポータルのレポート

Office 365 の情報を出力するレポートが管理者ポータルからアクセスできます。このレポートは Microsoft Graph から取得しています。

Capture.PNG

まとめ

会社全体の状況を把握することも、ライセンスの管理に活用することもできますし、他のレポートと合わせて使うことも可能です。管理者同意が必要な点とすべてのデータが取れる点、セキュリティの観点から気を付けてください。

目次に戻る

参照

Microsoft Graph での Office 365 使用状況レポートの使用

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1