Home / Getting Started

Microsoft 365 Drive ID collection script

Use the below SharePoint document library ID collection script (get_drive_ids.ps1) to collect drive IDs that are required in the Define Drives list in Transend Migration Console.

It is required you complete the Setup steps before running the inventory script, which is located at the bottom of this page.

Setup

  1. Log into the Microsoft Entra admin center as a tenant administrator.
  2. Navigate to Entra ID -> App registrations.
  3. Click New registration.
  4. Give the new application a name. For example, Drive ID Collection. Use the defaults for other options.
  5. Click Register.
  6. From the Overview tab, make note of the Application (client) ID value.
  7. Navigate to the the Certificates & secrets tab.
  8. Click New client secret.
  9. Give the secret a name. For example, Secret1. Use the default expiration.
  10. Click Add.
  11. From the following screen, make note of the Value value. Note that this is the only time the value will be displayed. If you do not remember the value, repeat steps 7-11.
  12. Navigate to the API permissions tab.
  13. Click Add a permission.
  14. Choose Microsoft Graph -> Application permissions -> Sites.Read.All and click Add permissions.
  15. Click Grant admin consent.

Usage

.\get_drive_ids.ps1
-AppId <AppId>
-AppSecret <AppSecret>
-TenantId <TenantId>
-Target <Google | M365 | Local>
-CloudEnvironment <Default | DoD | GCCHigh | China | Germany>

Parameters

Parameter Required Values Description
-AppId Yes App ID The application ID to use for authentication. This is the value from Setup Step 6.
-AppSecret Yes App secret The application secret to use for authentication. This is the value from Setup Step 11.
-TenantId Yes Tenant identifier The tenant ID to connect to.
-Target Yes Google, M365, Local The provider you are migrating to.
-CloudEnvironment No Default, DoD, GCCHigh, China, Germany The cloud environment to connect to. Use this option if your tenant is not in the worldwide cloud.

Examples

Example 1: Collect drive IDs for migrating to Google Workspace

.\get_drive_ids.ps1 -AppId '8b26caf2-2ef6-4a9d-9c27-98616d1c1294' -AppSecret '9pitRZoTezs6M0b~bgcibEfkG6qMaczuNV25Ol6m' -TenantId 'example.org' -Target 'Google'  

Example 1: Collect drive IDs for migrating to Microsoft 365

.\get_drive_ids.ps1 -AppId '8b26caf2-2ef6-4a9d-9c27-98616d1c1294' -AppSecret '9pitRZoTezs6M0b~bgcibEfkG6qMaczuNV25Ol6m' -TenantId 'example.org' -Target 'M365'  

Example 3: Collect drive IDs for migrating to the local filesystem or a file share

.\get_drive_ids.ps1 -AppId '8b26caf2-2ef6-4a9d-9c27-98616d1c1294' -AppSecret '9pitRZoTezs6M0b~bgcibEfkG6qMaczuNV25Ol6m' -TenantId 'example.org' -Target 'Local'  

Inventory script

After completing the above Setup steps, download and run the following inventory script: