This issue affects only Adaxes versions that use the Exchange Online Management (EXO v3) PowerShell module:
- Adaxes 2023.2 - all versions
- Adaxes 2023 - starting from version 3.15.21404
- Adaxes 2021.1 - starting from version 3.14.21404
- Adaxes 2020.1 - starting from version 3.13.21404
Description
If a Microsoft 365 tenant is registered in Adaxes via user account credentials and the computer where Adaxes service is installed uses a proxy server, certain operations in Exchange Online will always fail with the following error message.
Error message
{
"error": {
"code": "BadRequest",
"message": "Cmdlet needs proxy. Current Server FQDN : server.prod.outlook.com, Required Server FQDN : server2.prod.outlook.com",
"innererror": {
"message": "Cmdlet needs proxy. Current Server FQDN : server.prod.outlook.com, Required Server FQDN : server2.prod.outlook.com",
"type": "Microsoft.Exchange.Admin.OData.Core.ODataServiceException",
"stacktrace": "at Microsoft.Exchange.AdminApi.CommandInvocation.CommandInvocation.InvokeCommand(QueryContext queryContext, CmdletInvokeInputType cmdletInvokeInputType)
at Microsoft.Exchange.Admin.OData.Core.PathSegmentToExpressionTranslator.Translate(OperationImportSegment segment)
at Microsoft.Exchange.Admin.OData.Core.QueryContext.ResolveQuery(ODataContext context, Int32 level)
at Microsoft.Exchange.Admin.OData.Core.Handlers.OperationHandler.Process(IODataRequestMessage requestMessage, IODataResponseMessage responseMessage)
at Microsoft.Exchange.Admin.OData.Core.Handlers.RequestHandler.Process(Stream requestStream)"
}
}
}
Cause
The EXO v3 PowerShell module has a known issue with user account authentication in such scenarios.
Solution
Switch the tenant registration to an application account. For more details, see how to Register Adaxes as an app in Microsoft Azure.