microsoft / microsoft/CSS-Exchange

Setup - System Mailboxes missing Last Name

Open
#578 1 comment 0 reactions 1 assignee View on GitHub

@dpaulson45 is already working on this.

Since May 6, 2021.

Enhancement Need Investigation Setup Setup Assist Setup Log Reviewer
Dominant language
PowerShell
Stars
1.3k
Forks
395
Avg merge
14h 7m
Merged PRs (30d)
5

Description

Is your request related to a problem? Please describe.

See this issue in the setup log

[05/06/2021 15:10:32.0435] [1] [ERROR] The following error was generated when "$error.Clear(); 
          $auditLogMbxName = "SystemMailbox{8cc370d3-822a-4ab8-a926-bb94bd0641a9}";
          $auditLogMbxLastName = "SystemMailbox 8cc370d3-822a-4ab8-a926-bb94bd0641a9";
          Write-ExchangeSetupLog -Info ("Retrieving users with LastName=$auditLogMbxLastName.");
          $auditLogUser = @(Get-User -Filter {LastName -eq $auditLogMbxLastName} -IgnoreDefaultScope -ResultSize 1);
          if ($auditLogUser.Length -eq 0)
          {
            Write-ExchangeSetupLog -Info ("Retrieving audit log users with LastName=$auditLogMbxLastName.");
            $auditLogUser = @(Get-User -AuditLog -Filter {LastName -eq $auditLogMbxLastName} -IgnoreDefaultScope -ResultSize 1);
          }

          if ($auditLogUser.Length -eq 0)
          {
            Write-ExchangeSetupLog -Info ("Installing user account with Name=$auditLogMbxName and LastName=$auditLogMbxLastName.");
            Install-UserAccount -Name $auditLogMbxName -LastName $auditLogMbxLastName;
          }
          else
          {
            Write-ExchangeSetupLog -Info ("Audit log user $auditLogMbxName already exists.");
          }
        " was run: "Microsoft.Exchange.Data.Directory.ADConstraintViolationException: An Active Directory Constraint Violation error occurred on ServerFQDN. Additional information: The operation failed because UPN value provided for addition/modification is not unique forest-wide.
Active directory response: 000021C8: AtrErr: DSID-03200BF6, #1:
	0: 000021C8: DSID-03200BF6, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 90290 (userPrincipalName)
 ---> System.DirectoryServices.Protocols.DirectoryOperationException: A value in the request is invalid.
   at System.DirectoryServices.Protocols.LdapConnection.ConstructResponse(Int32 messageId, LdapOperation operation, ResultAll resultType, TimeSpan requestTimeOut, Boolean exceptionOnTimeOut)
   at System.DirectoryServices.Protocols.LdapConnection.SendRequest(DirectoryRequest request, TimeSpan requestTimeout)
   at Microsoft.Exchange.Data.Directory.GuardedDirectoryExecution.Execute[T](String bucketName, Func`1 action, Int64& concurrency)
   at Microsoft.Exchange.Data.Directory.PooledLdapConnection.GuardedSendRequest(String forestName, GuardedDirectoryExecution guardedDirectoryExecution, DirectoryRequest request, TimeSpan timeout, Func`3 sendRequestDelegate, Int64& concurrency)
   at Microsoft.Exchange.Data.Directory.PooledLdapConnection.SendRequest(DirectoryRequest request, LdapOperation ldapOperation, Nullable`1 clientSideSearchTimeout, IADLogContext logContext, Boolean shouldLogLastFilter)
   at Microsoft.Exchange.Data.Directory.ADDataSession.ExecuteModificationRequest(ADObject entry, DirectoryRequest request, ADObjectId originalId, Boolean emptyObjectSessionOnException, Boolean isSync)
   --- End of inner exception stack trace ---
   at Microsoft.Exchange.Data.Directory.ADDataSession.AnalyzeDirectoryError(PooledLdapConnection connection, DirectoryRequest request, DirectoryException de, Int32 totalRetries, Int32 retriesOnServer, String callerFilePath, Int32 callerFileLine, String memberName)
   at Microsoft.Exchange.Data.Directory.ADDataSession.ExecuteModificationRequest(ADObject entry, DirectoryRequest request, ADObjectId originalId, Boolean emptyObjectSessionOnException, Boolean isSync)
   at Microsoft.Exchange.Data.Directory.ADDataSession.Save(ADObject instanceToSave, IEnumerable`1 properties, Boolean bypassValidation)
   at Microsoft.Exchange.Data.Directory.Recipient.ADRecipientObjectSession.Save(ADRecipient instanceToSave, String callerFilePath, Int32 callerFileLine, String memberName)
   at Microsoft.Exchange.Management.Deployment.InstallUserAccount.InternalProcessRecord()
   at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__91_1()
   at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".

Describe The Request

Add a check for this in the SetupAssist for the mailboxes that are causing this issue. Also add a check for this in the SetupLogReviewer.

Additional context

It appears that the Last Name of the User object is null or doesn't match what we are looking for. This is why we can't find it and are trying to create a new mailbox.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.