ISSUE: Input exceeded the maximum allowable length for the field
Last modified:
Overview
When running leavers migration you can encounter following error on the "Create O365 user" workflow step.
2023-09-18T06:51:05|ERROR||192.168.140.254|T:167|ScriptBase |Leaver_constructednamefromarchivename@cloudficient.onmicrosoft.com ||1839 |f3f33779-3317-4209-9e1f-0c448d68e133| ||An error occurred for O365_CreateO365User - Leaver_constructednamefromarchivename@cloudficient.onmicrosoft.com/1839
EXCEPTION: System.Exception: Input exceeded the maximum allowable length for the field. Parameter name: LASTNAME
at cloudficient.Common.Powershell.ThreadPools.ExecuteWithResultCheck[T](SmartThreadPool threadPool, Func`1 executeInThreadpool)
at cloudficient.EVComplete.Module.Exchange.Executors.MigrationProcessSteps.PowerShellExecuteBase`2.Phase1() in E:\_w\o\2\1\s\EV2O365.OnPrem.Exchange\Executors\MigrationProcessSteps\PowerShellExecuteBase.cs:line 51
Cause
During the process of leavers migration we creating user in O365. For this creation we using First Name and Last name from Enterprise Vault archive to construct user UPN/SMTP and create the user.
If those two fields are not populated in Enterprise Vault for the archive we using Archive Name to construct required values.
Sometime it can happen that ArchiveName is very long so constructed name exceeded the limit.
Solution
You need to update the UPN in few tables to shorter version of the name.
1. Update LeaverTempIdentifier column in theĀ LeaverMappingSelection
2. Update UserPrincipalName and PrimarySMTPAddress column in the Mailboxes table
NOTE: it's preferred to use same value for all three columns update, e.g. Leaver_shortname@contonso.com