Logo

Documentation home for Transend tools

Microsoft 365 Initialize App script

Use m365_initialize_app.ps1 to create and configure the Microsoft Entra ID app that Transend products use to connect to Microsoft 365. The script creates the app registration and service principal, assigns the Microsoft Graph, Exchange, and SharePoint permissions needed by the migration tools, grants admin consent, creates a client secret, and assigns the required directory role. Automating these steps reduces manual setup and helps ensure that the credentials supplied to the other Microsoft 365 scripts have the required access.

After the migration is complete, remove the app registration from Microsoft Entra ID if it is no longer needed, following your organization’s application-retirement process.

Setup

  1. Download TMCTools.
  2. From the TMCTools zip file, extract common.psm1, m365.psm1 and m365_initialize_app.ps1 from the TMCTools/bin folder.

Usage

.\m365_initialize_app.ps1
  -TenantId <TenantId>
  [-DisplayName <DisplayName>]
  [-RedirectUri <RedirectUri>]
  [-BootstrapAppId <BootstrapAppId>]
  [-CloudEnvironment <Default | DoD | GCCHigh | China | Germany>]

Parameters

Parameter Required Values Description
-TenantId Yes Tenant identifier The tenant ID to connect to.
-DisplayName No Display name The display name for the new app. Defaults to Transend Migration Suite.
-RedirectUri No Redirect URI Redirect URI for the new app. Defaults to http://localhost.
-BootstrapAppId No Entra app ID Client ID of the bootstrap app to use. Defaults to a Transend-provided app.
-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: Create the default migration app

.\m365_initialize_app.ps1 -TenantId 'example.org'

Troubleshooting

  • Review the log file in your Documents directory for more information.