IT Automation Activities for Microsoft Exchange Server


This activity is now available on the Official Stable Feed:

Learn more about it here :point_down:


UiPath.ExchangeServer.Activities package offers administration activities for Microsoft Exchange Server 2016 and 2019 (on-premises).

Microsoft Exchange Server is a mail and calendaring server developed by Microsoft. The provisioning of Exchange mailboxes for users is a common request for IT departments. Offering activities that create and delete Exchange mailboxes, as well as enable and disable archiving for existing mailboxes, will enable IT Departments to easily automate these actions in their (RPA) workflows.


  • Exchange Management Shell must be installed on the Exchange Server.
  • The machine where these activities are running should be domain-joined with the Exchange Server, and access should be available (FQDN of the Exchange Server should be known/resolved by the robot machine).

Example of Scenarios to Automate

Listed below are two scenarios where Exchange Server activities will be very helpful, especially when used together with UiPath’s Active Directory Domain Services activities pack described here:

Employees Onboarding

When a new employee is hired in a company, the HR department provides the input for a UiPath automation process which creates a corresponding new user account in Active Directory (AD), generates a random password for it and sets it to expire after the first login, adds the user account to a list of specified groups, and creates an Exchange mailbox associated with this user account.

Employees Offboarding

When an employee leaves the company, the associated AD user account is removed from the groups it belongs to, the associated Exchange mailbox is deleted, and the AD user account is disabled.

Activities List

Exchange Server Scope – Provides a scope for Exchange Server activities.

Create Mailbox – Creates a new mailbox for an existing Active Directory user account.

Delete Mailbox - Deletes the mailbox for a specified Active Directory user account.

Enable Mailbox Archive - Enables the archive for the specified mailbox.

Disable Mailbox Archive - Disables the archive for the specified mailbox.

How to install

UiPath.ExchangeServer.Activities package is available in Beta feed. Please follow the steps below to install the package in UiPath Studio:

  • If you haven’t already, add the UiPath Beta feed to your Studio Manage Package window.
  • In the Beta feed, check ‘Include Prerelease’, search for “UiPath.ExchangeServer.Activities”, and install the latest BETA version (we do not recommend using alpha versions).
    Important - We must reiterate, make sure you check the ‘Include Prerelease’ checkbox :blush:

The Exchange Server Activities should be visible now in UiPath Studio, as shown below:

How to use

Employees Onboarding

A UiPath workflow that processes an Excel file containing a list of new employees. For each employee it does the following:

  • Creates and enables a new AD user account by setting the following attributes: givenName, sn, telephoneNumber, physicalDeliveryOfficeName, department, title, and manager.

  • Forces the user to change password at the next login.

  • Adds the user to the specified AD groups.

  • Creates an Exchange mailbox associated with the new AD user account. (30.9 KB)

Employee Offboarding

A UiPath process that removes a specified user account from all the groups it belongs to, deletes the associated Exchange mailbox, and disables the account. The process has one input parameter called UserAccount. Its value shall be a valid SAM Account Name. (14.3 KB)

To exemplify, let’s go step by step through the process of creating the Employee Offboarding automation process:

  1. Follow the steps described in Employee Offboarding section of the forum post about Active Directory Domain Services available here: IT Automation Activities for Active Directory Domain Services

  2. Create two Assets in Orchestrator. They will be used later in Exchange Server Scope activity:

  • ExchangeServer_Address – the FQDN (Fully Qualified Domain Name) of the Exchange Server.
  • ExchangeServer_AdminCredentials – the Exchange Server administrator user credentials.
  1. Retrieve the values of ExchangeServer_Address and ExchangeServer_AdminCredentials assets, using Get Asset and Get Credentials Orchestrator activities. The values of these assets are stored in exchangeServer, exchangeUsername, and exchangePassword variables.

  2. Add the Exchange Server Scope activity and set the values for the required input parameters:

  • ExchangeServerAddress (String) - The FQDN of the Exchange Server, i.e. exchangeServer.

  • Username (String) - The user that will perform Exchange Server operations, i.e. exchangeUsername.

  • Password (SecureString) - The password for the provided Username, i.e. exchangePassword.

  1. Finally, add Delete Mailbox activity to remove the Exchange mailbox associated with the AD user account. This activity requires the User Principal Name of the AD user account as input parameter. To obtain the value of “userPrincipalName“ attribute, use Get Object Properties activity from UiPath.ActiveDirectoryDomainServices.Activities package.

  2. That’s all folks! You can run the process from UiPath Studio or publish it in Orchestrator and create a Job in order to execute it. Enjoy :blush:


Hi @ovidiuponoran,
You are rocking. I think you are the master in the server side components. :clap::clap::clap::clap::clap:


Thanks @balupad14 for your kind words!

We believe these IT activities enable IT Departments to easily automate most critical IT operations, so we are a very enthusiastic team making this happen.

New IT Automation activities packages will be available soon, e.g. for Azure, Citrix :slight_smile:

1 Like

Yes. it is true. Inside preview also mentioned that the Azure and Citrix activities will be on soon. Great job. UiPath is making the Automation very cool and easy like you people that making new activities. .Congratulations


Hello everyone!

Can someone help me please? I am receiving the following error

The value in the userPrincipalName is ok, and the others information I left it blank…

Exception details:

An ExceptionDetail,
likely created by IncludeExceptionDetailInFaults=true,
whose value is:
System.NullReferenceException: Object reference not set to an instance of an object.
at UiPath.ExchangeServer.Activities.ExchangeActivity.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance,
ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor,
BookmarkManager bookmarkManager,
Location resultLocation)

Hi Caio,

We are not facing any issue with create mailbox activity with the latest 1.0.8 UiPath.ExchangeServer.Activities package.
Could you please confirm the package number if you are still facing this issue.
Also you can verify if you are using correct userPrincipalName.


1 Like

Hi Anshu Kumar,

Yes, I am using the correct userPrincipalName. image
Probaly it is something at the exchange… any progress I let here the solution.

Thank you for your attention.

Hi All,

What is the best way to install Microsoft Exchange Server onto Windows 10. I apologize in advance if this question has been asked already.

Thank you,


@ovidiuponoran : In User On boarding process, bot is accessing AD, Exchange server using these activities.
Normally accessing these applications require elevated privileges for robot account to run in AWS VDI’s.

To use these activities, which approach is best - managed service account or robot account (considering security as prime factor)?

is there any difference to use activities for managed service account or robotic account in user on boarding process?

Hello @caio_monteiro ,
I have same error with Object reference not set to an instance of an object. Did you managed to find a solution for that?
Thank you.