Unable to connect to Exchange account

Hello everyone,

I got this issue when trying to connect to my Exchange Account. I provided server name, domain name, username and password.
I read that this error occured when wrong parameters were provided.
So can you confirm me that domain name is : “domain.com”, and that username is “user” in user@domain.com?

I tried almost everything so it may not be a syntax error.
Thanks for your help,

Regards,

Enzo

An error has occured

Message: ISerializable type ‘Microsoft.Exchange.WebServices.Data.ServiceRequestException’ does not have a valid constructor. To correctly implement ISerializable a constructor that takes SerializationInfo and StreamingContext parameters should be present. Path ‘Error’, line 1, position 2942.

Source: Newtonsoft.Json

Exception Type: JsonSerializationException

Newtonsoft.Json.JsonSerializationException: ISerializable type ‘Microsoft.Exchange.WebServices.Data.ServiceRequestException’ does not have a valid constructor. To correctly implement ISerializable a constructor that takes SerializationInfo and StreamingContext parameters should be present. Path ‘Error’, line 1, position 2942.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateISerializable(JsonReader reader, JsonISerializableContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at UiPath.Shared.JsonParser.DeserializeObject[T](String jsonValue)
at UiPath.Models.UiPathDuplexProxy.<>c__DisplayClass21_0.b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()

1 Like

Hi @badita, @aksh1yadav,

do you guys have any clue with this error ?

Can some one help on this, please!

Thanks
Dilli

we need more info: what activity are you using, mail package version, can you connect in owa with the same credentials from the test machine

Using either Send Exchange Mail Message or Exchange Scope.

Mail Package Version : 1.1.6361.22988

And yes i can connect in owa with those credentials (tried with different Exchange accounts from different domains)

are you sure all the Properties of this activity are set? we don`t currently support Exchange 2016

Yes, it’s specified like that and my mail adress is username@mydomain.com in this example.

that server address does not look good to me :slight_smile:
try something like : exchangehostname.domain.com

Tried, still the same problem.

I found the server name right here, in my account settings in Outlook.

what kind of exchange server is that? on cloud?

Well i actually have no idea at all, sorry for that.

I am having this same problem @Gabriel_Tatu our server connects via https:// don’t know if that makes it cloud or otherwise, but my exchange version is 2010 sp2 and I get an error saying it cannot connect to server

Hello,
I hadthe same problem when using Exchange scope. I then tried not to use Exchange scope and with Get Exchange Mail without a scope, it worked fine. I think there is a bug in the implementation of Exchange scope.

Hi lodahl,

There is no known issue with Exchange Scope. Could you please share the Studio version and UiPath.Mail.Activities package version? And, just a suggestion, please double check your settings in Exchange Scope, maybe you’re missing something.

Hi I am unable to connect to exchange getting below error.

my exchange settings are below
image

Please help to resolve the issue

1 Like

Error on Send Exchange Mail Message on XML Response Error on Send Exchange Mail Message on XML Response

1 Like

I had to add /ews/exchange.asmx to my server URI. Further I needed to use username@mydomain for user and then it worked like a charm.

1 Like

these settings (required or not) depend a lot on the environment. some servers are ok with a simple username, others ask for the whole email address, depending on the security levels they are set up with

Hi, @Gabriel_Tatu
Could you help have a look if I am using the correct configuration.
Thanks.!
UIPath_exchange|514x500

I am still meeting error.

Is there an approach to investigate what a given exchange server requires other than just trying entering different values in ui path and try to run the job?

Hi , we are facing same issue, Exchange server activity failing for bothDev and Prod accounts and working for test account. till yesterday its running fine. Today , suddenly getting unauthorized error 401 (for dev and prod acccounts) . And outlook activity running fine. I tried from Studio also, same issue. Any inputs please?