ISSUE: Input exceeded the maximum allowable length for the field

Last modified:


Overview

Create O365 User step may failed to create a leaver user because user name with the "Leaver_" prefix exceeded O365 max length for User Principal Name (UPN). In the case of user UPN exceeded max length you will receive following error:

"O365_CreateO365User Phase 1: An error occurred during MSOL Powershell | Exception message 1: Input exceeded the maximum allowable length for the field. Parameter name: MailException message 2: Input exceeded the maximum allowable length for the field. Parameter name: MailException message 3: Input exceeded the maximum allowable length for the field. Parameter name: Mail | Parameters: [upn, LEAVER_CIB.Global.User.Administration.2010_04_27_2015_08_05._RA.EL_@standardbank.onmicrosoft.com] [preferredDataLocation, ZAF] [displayName, LEAVER_CIB.Global.User.Administration.2010_04_27_2015_08_05._RA.EL_@standardbank.onmicrosoft.com] [firstName, LEAVER_] [lastName, CIB.Global.User.Administration.2010_04_27_2015_08_05._RA.EL_] [department, ] [ProcessResult]"


Image 91

Solution

You need to shorter the name for the Leaver user UPN in the EV complete database.

Following columns in the tables need to be updated with the shorter name:


1. Table [dbo.Mailboxes]

           a. Column: UserPrincipalName

           b. Column: PrimatySmtpAddress

2. Table [dbo.LeaveMappingSelection]

           a. Column LeaverTempIdentifier

You can use following query to update all three columns with shorter name:

update Mailboxes set UserPrincipalName = 'LEAVER SHORTER NAME' where UserPrincipalName='LEAVER ORIGINAL NAME'
update Mailboxes set PrimarySmtpAddress = 'LEAVER SHORTER NAME' where PrimarySmtpAddress='LEAVER ORIGINAL NAME'
update LeaverMappingSelection set LeaverTempIdentifier='LEAVER SHORTER NAME' where LeaverTempIdentifier='LEAVER ORIGINAL NAME'


Is this article helpful for you?