Microsoft Exchange Web Service Error – ErrorFolderNotFound

“Failed to invoke Microsoft Exchange web service. Task item failed with response code ErrorFolderNotFound”

This is the error that you get when you connect to the Exchange Web Service.

My application encountered the same error in the scenario when I tried connecting to the Exchange Web Service using the Create Appointment Action of Nintex workflow.

Introduction

My application has a “demo presenter field” that could be any user from the organization. This user has to send out the meeting invite to all the stakeholders (which is a field in the form). The meeting has to be created using the workflow. Now Nintex offers this perfect “Create Appointment” action that connects to the exchange server and creates an appointment for the user mentioned there. But still, there is probability to encounter this error in a situation as discussed below.

Problem Statement– If the credentials used to connect to the exchange server and the “For” field in the create appointment action are same, the appointment is created. This means the current user (whose credentials are passed) is only trying to access his own mailbox and is able to create the meeting as expected.

However, when the credentials (provided to connect to the exchange server) do not match with the user for whom meeting has to be created (remember the “For” field), the workflow throws the error – “Failed to invoke Microsoft Exchange web service. Task item failed with response code ErrorFolderNotFound”. This means that the user (whose credentials are provided)does not have permissions to create a task for the user specified below (again the user in “For” field).

Now the point is to access the exchange server with credentials that has permissions to create task / appointment from some other user’s mailbox also (specifically the user who is mentioned in the “For” field of Create Appointment action).

Below is the snapshot of the create appointment action for a better picture.

appt_New(1)

Solution – The solution to fix this problem is to give permissions to that one account (that is used to access the exchange server) over the mailboxes (minimum permission to create appointment).

The solution is tested. My account was given permission over a couple of user’s mailboxes; after which the workflow ran absolutely fine to create appointments. The meeting invite goes from the presenter’s mailbox to the various stakeholders. But the catch here is, the meeting or appointment is created by system account(account used to access the exchange server) on behalf of the user.

Here, my account is used to connect to the exchange server, and I created the appointment n behalf of Noor Mahdi. Below is the snap shot of the email sent to presenter.

appt_New(2)

Hence the idea is to have an account that would be used to access the exchange server. This account will be given permissions over all the mailboxes to create appointments.

 

One thought on “Microsoft Exchange Web Service Error – ErrorFolderNotFound

Leave a reply to Manisha Cancel reply