We are trying to access the mail service using the Microsoft power automate desktop action “Connect to Exchange server”.
While we execute this action, we are getting the following error.
Error Message:
Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Failed to connect to the Exchange server. ---> Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. The remote server returned an error: (401) Unauthorized. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest.GetResponse()
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
--- End of inner exception stack trace ---
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request)
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder(FolderId folderId, PropertySet propertySet)
at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder[TFolder](FolderId folderId, PropertySet propertySet)
at Microsoft.Flow.RPA.Desktop.Modules.Exchange.Actions.ExchangeActions.ConnectToExchangeServerAction(Variant serverAddress, Variant username, Variant domain, Variant passwordVar, Variant emailAddress, Variant timeout, Variant& exchangeConnection, Int32 connectionType, Int32 exchangeCredentialsMode, Int32 exchangeVersion)
--- End of inner exception stack trace ---
at Microsoft.Flow.RPA.Desktop.Modules.Exchange.Actions.ConnectToExchangeServer.Execute(ActionContext context)
at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)
Please note that, we have not changed any setting in user level or tenant level.
We are using the Microsoft Exchange server to send/Receive/Process emails.
We had successfully executed this action till 18/10/2022 Tuesday.