When using an impersonation account that either doesn't have a mailbox or their mailbox is in EXO, you get the following error:
Could not open mailbox. Error:
Exception calling "Bind" with "2" argument(s): "The SMTP address has no mailbox associated with it."
This is a result of checking the credentials from this line:
CheckOnpremCredentials -ewsService $Service
which calls the function and fails here:
try {
$null = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($ewsService, [Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::MsgFolderRoot)
}
the mailbox not found exception could be used to validate the credentials as well, as it does show the connection succeeded
When using an impersonation account that either doesn't have a mailbox or their mailbox is in EXO, you get the following error:
Could not open mailbox. Error:
Exception calling "Bind" with "2" argument(s): "The SMTP address has no mailbox associated with it."
This is a result of checking the credentials from this line:
CheckOnpremCredentials -ewsService $Service
which calls the function and fails here:
try {
$null = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($ewsService, [Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::MsgFolderRoot)
}
the mailbox not found exception could be used to validate the credentials as well, as it does show the connection succeeded