To allow Cloudiway to access your Microsoft 365 tenant and perform migrations (emails, files, Teams), you need to create an EntraID application (formerly Azure AD) with the appropriate permissions. This guide walks you through this configuration step by step.
Video Tutorial
Automatic vs Manual Configuration
The following steps will generate the Client ID, the Client Secret, and the Certificate needed in your Cloudiway connector.
Prerequisites
Before you begin, make sure you have:
- Global Administrator or Application Administrator rights on the Microsoft 365 tenant
- Access to the Azure Portal
- PowerShell installed on your computer (for certificate creation)
- An active Cloudiway account
Step 1: Create the Certificate for the New Application
Using PowerShell, execute the following commands to create your certificate:
$certname = "{certificateName}" ## Replace {certificateName} with your certificate name
$cert = New-SelfSignedCertificate -Subject "CN=$certname" `
-CertStoreLocation "Cert:\CurrentUser\My" `
-KeyExportPolicy Exportable `
-KeySpec Signature `
-KeyLength 2048 `
-KeyAlgorithm RSA `
-HashAlgorithm SHA256 Export the certificate (.cer):
Export-Certificate -Cert $cert -FilePath "C:\Users\admin\Desktop\$certname.cer" ## Specify your preferred location Certificate Name
CloudiwayMigration or CloudiwaySource to easily identify the certificate later.
Step 2: Create the Private Key with a Password for Cloudiway
Execute the following command lines to define your password:
$mypwd = ConvertTo-SecureString -String "{myPassword}" -Force -AsPlainText ## Replace {myPassword} with a strong password Export the Private key (.pfx):
Export-PfxCertificate -Cert $cert -FilePath "C:\Users\admin\Desktop\$certname.pfx" -Password $mypwd ## Specify your preferred location Save Your Password
Step 3: Create a New Application
Log in to the Azure portal using your Microsoft 365 administrator account:
- Go to https://portal.azure.com
- Select Microsoft Entra ID
- Click on App Registration
- Click on New Registration
- Give a name to the application (e.g.,
Cloudiway Platform) - Supported Account types: Select "Accounts in this Organizational directory Only"
Redirect URI Configuration
If you are migrating Microsoft Teams and plan to migrate direct messages, you need to add these two redirect links in the source Application:
https://portal.cloudiway.com/teams/callbackhttps://portal.cloudiway.com/connector
In other cases, the redirect URL is not used. Enter any value, for example https://notused
- Click on Register
Important
Step 4: Upload Certificate
Upload the Certificate
- Click on Certificates and Secrets
- Click on the Certificates tab
- Click on Upload Certificate
- Select the
.cerfile you created in Step 1 - Click Add
Enable Public Client Flows
- Click on Authentication in the left menu
- Scroll down to Advanced settings
- Enable "Allow public client flows" and set it to Yes
- Click Save
Step 5: Configure API Permissions
The required permissions depend on the type of migration you are performing and whether the connector is configured as Source or Target.
- Click on API Permissions in the left menu
- Click on Add a permission
- Select Microsoft Graph or SharePoint depending on the workload
- Choose Application permissions
- Add the required permissions based on the tables below
Permissions Reference Tables
Below are the detailed permissions required for each connector type. Permissions marked with (Delegated) require delegated permissions instead of application permissions.
Microsoft Graph API Permissions - Source Connector
| Connector | API | Source Permissions |
|---|---|---|
| GALSync | Microsoft Graph | Directory.Read.AllGroup.Read.AllUser.Read.AllOrgContact.Read.AllTo modify Guest/Mail users: User.ReadWrite.AllTo create items as Guests: User.Invite.All |
| Office 365 Exchange Online | Exchange.ManageAsApp | |
| Free/Busy | Microsoft Graph | Calendars.Read |
| Office 365 Exchange Online | Exchange.ManageAsApp | |
| Microsoft Graph | Directory.Read.AllGroup.Read.All | |
| Office 365 Exchange Online | full_access_as_appExchange.ManageAsApp | |
| OneDrive | Microsoft Graph | Directory.Read.AllFiles.Read.AllSites.Read.AllGroup.Read.AllUser.Read.All |
| Teams | Microsoft Graph | ChannelMember.ReadWrite.AllChannelMessage.Read.All (Delegated)ChannelMessage.Read.AllChat.Read (Delegated)Chat.Read.AllDirectory.Read.AllFiles.Read.All (Delegated)Files.Read.AllGroup.Read.All (Delegated)Group.Read.AllGroup.ReadWrite.All *GroupMember.Read.All (Delegated)Sites.Read.All (Delegated)Sites.Read.AllUser.Read.AllTasks.Read.All |
| Office 365 Exchange Online | full_access_as_appExchange.ManageAsApp | |
| SharePoint | Microsoft Graph | Directory.Read.AllFiles.Read.AllGroup.Read.AllGroup.ReadWrite.All *Sites.Read.AllUser.Read.All |
| Signature | Microsoft Graph | User.Read.AllGroup.Read.AllUser.Read |
| Intune | Microsoft Graph | Agreement.Read.AllApplication.Read.AllDeviceManagementApps.Read.AllDeviceManagementConfiguration.Read.AllDeviceManagementManagedDevices.Read.AllDeviceManagementRBAC.Read.AllDeviceManagementServiceConfig.Read.AllDirectory.Read.AllGroup.Read.AllOrganization.Read.AllPolicy.Read.AllPolicy.Read.ConditionalAccessPolicy.Read.PermissionGrant |
* The migration account needs to be the Owner and Member of the Group/Team in the source and the target. If it is not the Owner and Member of the Team, the migration engine will add it automatically with the permission Group.ReadWrite.All.
SharePoint Online API Permissions - Source vs Target
| Connector | API | Source Permissions | Target Permissions |
|---|---|---|---|
| SharePoint | SharePoint | Sites.FullControl.AllUser.Read.AllSites.Read.All | User.ReadWrite.AllSites.FullControl.AllTermStore.ReadWrite.All |
| OneDrive | SharePoint | Sites.FullControl.AllUser.Read.AllSites.Read.All | User.ReadWrite.AllSites.Read.All |
Target Connector - Microsoft Graph Permissions
For Target connectors, you generally need Write permissions instead of Read permissions. Here is a summary:
| Connector | Target Permissions (Microsoft Graph) |
|---|---|
Directory.Read.AllGroup.ReadWrite.AllSites.ReadWrite.AllUser.ReadWrite.AllFiles.ReadWrite.All | |
| OneDrive/Files | Directory.Read.AllFiles.ReadWrite.AllSites.ReadWrite.AllGroup.ReadWrite.AllUser.ReadWrite.All |
| Teams | ChannelMember.ReadWrite.AllDirectory.Read.AllFiles.ReadWrite.AllGroup.ReadWrite.AllSites.ReadWrite.AllUser.ReadWrite.All |
| SharePoint | Directory.Read.AllFiles.ReadWrite.AllGroup.ReadWrite.AllSites.ReadWrite.AllUser.ReadWrite.All |
Step 6: Mail Migration - Additional Configuration
When is this step required?
6.1 Add EWS Permissions (Office 365 Exchange Online)
For Mail migration, you need to add permissions from the Office 365 Exchange Online API (not Microsoft Graph):
- Go to API Permissions and click Add a permission
- Select the tab APIs my organization uses
- Search for
Office 365 Exchange Onlineand select it - Select Application permissions
- Expand Other permissions and select
full_access_as_app - Also add
Exchange.ManageAsApp(required for Exchange administration) - Click Add permissions
6.2 Configure App-Only Authentication (Manifest)
To enable app-only authentication for Exchange, you need to modify the application manifest:
- Select Manifest in the left-hand navigation under Manage
- Locate the
requiredResourceAccessproperty in the manifest, and add the following inside the square brackets ([]):
{
"resourceAppId": "00000002-0000-0ff1-ce00-000000000000",
"resourceAccess": [
{
"id": "dc890d15-9560-4a4c-9b7f-a736ec74ec40",
"type": "Role"
}
]
} - Click Save at the top of the page
6.3 Assign Microsoft Entra Roles
You need to assign the following roles to your application:
- Exchange Administrator
- Exchange Recipient Administrator
Steps to Assign Roles:
- Navigate to the Microsoft Entra roles and administrators page:
https://portal.azure.com/#view/Microsoft_AAD_IAM/AllRolesBlade - Search for
Exchangein the roles filter - Select the Exchange Administrator role
- Click on Add Assignment
- Search for and select the app that you created
- Click Add
- Repeat the above steps for the Exchange Recipient Administrator role
Automatic Cloudiway Connectors
- For Source:
5f7eb765-974a-45c6-8f93-43a417abdedd - For Target:
ac1e5a45-2177-412c-ac06-09ba04df530a
Step 7: Grant Admin Consent
For the application to use the granted permissions:
- Go back to "API permissions"
- Click on "Grant admin consent for [your organization]"
- Confirm by clicking "Yes"
All permissions should now display a green checkmark in the "Status" column.
Configuration in Cloudiway
Now that your application is created, configure it in Cloudiway:
- Log in to the Cloudiway Portal
- Navigate to your project and open the Connector Settings
- Enter the following information:
- Tenant ID: The Directory (tenant) ID noted earlier
- Application ID: The Application (client) ID
- Certificate: Upload the
.pfxfile created in Step 2 - Certificate Password: The password you set when creating the private key
- Test the connection to validate the configuration
Configuration complete!
Common Troubleshooting
"Insufficient privileges" Error
This error indicates that:
- Admin consent has not been granted
- Permissions are missing
- The secret has expired
Solution: Check in "API permissions" that all permissions have "Granted" status and that the secret is still valid.
"AADSTS700016: Application not found" Error
The Application ID is incorrect or the application has been deleted.
Solution: Verify the Application ID in the Azure portal and in the Cloudiway configuration.
"Invalid client secret" Error
The client secret is incorrect or has expired.
Solution: Generate a new secret or use certificate authentication (recommended) and update the configuration in Cloudiway.
"Certificate Error" or "Invalid Certificate"
The certificate is invalid, expired, or the password is incorrect.
Solution: Verify that:
- You uploaded the
.cerfile to Azure (not the.pfx) - You provided the
.pfxfile and correct password to Cloudiway - The certificate has not expired