アプリ プロファイルでカスタム アプリの使用を選択した場合、移行用の Microsoft 365 ユーザー に任意のユーザーを指定することができますが、アプリにこれらの権限が付与されていることを確認してください。
API 名 |
権限名 |
説明 |
タイプ |
必要となる理由 |
Microsoft Graph |
Domain.Read.All |
Read domains |
アプリケーション |
SharePoint 管理センターに接続する移行先テナントの初期ドメインを定義します。 |
Sites.ReadWrite.All |
Read and write items in all site collections |
アプリケーション |
SharePoint データを移行先に移行します。 | |
User.Read.All |
Read all users' full profiles |
アプリケーション |
OneDrive ユーザー名で移行先 OneDrive サイトの URL を取得します。 | |
SharePoint |
Sites.FullControl.All |
Have full control of all site collections |
アプリケーション |
SharePoint データを移行先に移行します。 |
User.Read.All |
Read user profiles |
アプリケーション |
OneDrive ユーザー名で移行先 OneDrive サイトの URL を取得します。 | |
Azure Rights Management Services |
Content.DelegatedWriter |
Create protected content on behalf of a user |
アプリケーション |
ファイル / ライブラリ / サイトの秘密度ラベルを管理する場合にのみ必要です。 |
Content.Writer |
Create protected content |
アプリケーション | ||
Microsoft Information Protection Sync Service |
UnifiedPolicy.Tenant.Read |
Read all unified policies of the tenant |
アプリケーション |
ファイル / ライブラリ / サイトの秘密度ラベルを管理する場合にのみ必要です。 |
*注意: 以下のコマンドを使用し、マニフェスト を介して必要な API 権限を追加することができます。
"requiredResourceAccess": [
{
"resourceAppId": "870c4f2e-85b6-4d43-bdda-6ed9a579b725",
"resourceAccess": [
{
"id": "8b2071cd-015a-4025-8052-1c0dba2d3f64",
"type": "Role"
}
]
},
{
"resourceAppId": "00000003-0000-0ff1-ce00-000000000000",
"resourceAccess": [
{
"id": "df021288-bdef-4463-88db-98f22de89214",
"type": "Role"
},
{
"id": "678536fe-1083-478a-9c59-b99265e6b0d3",
"type": "Role"
}
]
},
{
"resourceAppId": "00000012-0000-0000-c000-000000000000",
"resourceAccess": [
{
"id": "006e763d-a822-41fc-8df5-8d3d7fe20022",
"type": "Role"
},
{
"id": "d13f921c-7f21-4c08-bade-db9d048bd0da",
"type": "Role"
}
]
},
{
"resourceAppId": "00000003-0000-0000-c000-000000000000",
"resourceAccess": [
{
"id": "9492366f-7969-46a4-8d15-ed1a20078fff",
"type": "Role"
},
{
"id": "df021288-bdef-4463-88db-98f22de89214",
"type": "Role"
},
{
"id": "dbb9058a-0e50-45d7-ae91-66909b5d4664",
"type": "Role"
}
]
}
],
*注意: 上位に一覧表示している権限は、テナント内のすべての OneDrive サイトを移行するために必要です。特定の OneDrive サイトのみを移行する場合、異なる権限設定が構成されている別のカスタム アプリの使用に変更してください。以下の説明を参照してください。
1. アプリに使用する以下の権限を追加します。
API 名 |
権限名 |
説明 |
タイプ |
必要となる理由 |
Microsoft Graph |
Domain.Read.All |
Read domains |
アプリケーション |
SharePoint 管理センターに接続する移行先テナントの初期ドメインを定義します。 |
Sites.Selected |
Access selected site collections |
アプリケーション |
指定した OneDrive サイトのデータを取得して移行します。 | |
User.Read.All |
Read all users' full profiles |
アプリケーション |
OneDrive ユーザー名で移行先 OneDrive サイトの URL を取得します。 | |
SharePoint |
Sites.Selected |
Access selected site collections |
アプリケーション |
指定した OneDrive サイトのデータを取得して移行します。 |
User.Read.All |
Read user profiles |
アプリケーション |
OneDrive ユーザー名で移行先 OneDrive サイトの URL を取得します。 | |
Azure Rights Management Services |
Content.DelegatedWriter |
Create protected content on behalf of a user |
アプリケーション |
ファイル / ライブラリ / サイトの秘密度ラベルを管理する場合にのみ必要です。 |
Content.Writer |
Create protected content |
アプリケーション | ||
Microsoft Information Protection Sync Service |
UnifiedPolicy.Tenant.Read |
Read all unified policies of the tenant |
アプリケーション |
ファイル / ライブラリ / サイトの秘密度ラベルを管理する場合にのみ必要です。 |
以下のコマンドを使用して、マニフェスト を介して必要な API 権限を追加することができます。
"requiredResourceAccess": [
{
"resourceAppId": "870c4f2e-85b6-4d43-bdda-6ed9a579b725",
"resourceAccess": [
{
"id": "8b2071cd-015a-4025-8052-1c0dba2d3f64",
"type": "Role"
}
]
},
{
"resourceAppId": "00000012-0000-0000-c000-000000000000",
"resourceAccess": [
{
"id": "006e763d-a822-41fc-8df5-8d3d7fe20022",
"type": "Role"
},
{
"id": "d13f921c-7f21-4c08-bade-db9d048bd0da",
"type": "Role"
}
]
},
{
"resourceAppId": "00000003-0000-0ff1-ce00-000000000000",
"resourceAccess": [
{
"id": "df021288-bdef-4463-88db-98f22de89214",
"type": "Role"
},
{
"id": "20d37865-089c-4dee-8c41-6967602d4ac8",
"type": "Role"
}
]
},
{
"resourceAppId": "00000003-0000-0000-c000-000000000000",
"resourceAccess": [
{
"id": "dbb9058a-0e50-45d7-ae91-66909b5d4664",
"type": "Role"
},
{
"id": "883ea226-0bf2-4a8f-9f9d-92c9162a727d",
"type": "Role"
},
{
"id": "df021288-bdef-4463-88db-98f22de89214",
"type": "Role"
}
]
}
],
2. ストレージ場所 (英語) にアクセスして、GrantFullControlForOneDriveUser.ps1 および OneDriveUsers.csv ファイルをネットワーク接続が構成されているマシンのカスタム フォルダーにダウンロードします。
3. カスタム フォルダーで、OneDriveUsers.csv ファイルを開いて、以下のように移行する OneDrive サイトの URL を入力します。
4. アプリにサイト コレクションへのフル コントロール権を付与するには、同意ユーザーにグローバル管理者ロールを割り当てて、そのユーザーをサイトの サイト コレクション管理者 に追加します。
5. カスタム フォルダーで、GrantFullControlForOneDriveUser.ps1 ファイルをメモ帳で開きます。
6. 必要な情報で以下のパラメーターを構成します。
•$appId = 'Custom App client ID' – カスタム アプリのクライアント ID を入力します。
•$appName = 'Custom App Display name' – カスタム アプリの表示名を入力します。
•$connection = Connect-PnPOnline -Url 'SharePoint Admin Center URL' – テナントの SharePoint 管理センター URL を入力します。
*注意: カスタム アプリに SharePoint 管理センター URL への権限が付与されていない可能性があります。Fly Server 接続の追加時にテナント ドメインの検証を回避するには、...\FLY\Manager\Control\bin\ TimerService.exe.config ファイルで <add key="CheckInitialDomainError" value="false"/> ノードを追加して、Fly Timer Service を再開してください。この変更は移行ジョブに影響を与えません。
7. Windows PowerShell を開き、Windows PowerShell ウィンドウで以下のコマンドを入力します。
."file path"
解凍されたフォルダー内の GrantFullControlForOneDriveUser.ps1 ファイルの完全パスで file path を置き換え、キーボードの Enter キーを押します。
*注意: PnP PowerShell が環境にインストールされていることを確認してください。
8. カスタム アプリの証明キーを入力し、キーボードの Enter を押します。
9. 資格情報を入力してください ウィンドウで、ステップ 5 で割り当てられた同意ユーザーのユーザー名およびパスワードを入力して、[OK] をクリックします。
10. プロセスの終了後、必要に応じてサイトの サイト コレクション管理者 からその同意ユーザーを削除することができます。