To establish a connection between your AskCody Manager and Exchange, you need to create a normal Exchange user and give this user ApplicationImpersonation. This user will be referred to as a Service Account and will ensure that all calendar activity is kept in sync between AskCody and Exchange.
You can either create the service account using the Exchange Console (2010), the Exchange Admin Center (2013/2016) or via PowerShell
How to create a Service Account via PowerShell
1. Open the Exchange management shell and run the following command:
New-Mailbox -UserPrincipalName sa@domain -Alias SA -Name serviceaccount - OrganizationalUnit Users -FirstName Service -LastName Account -DisplayName "Service Account"
Make sure "domain" is replaced with the domain of your organization. The shell will prompt you to enter a password for the new user. This password will later be used to connect the service in the AskCody management portal.
2. In the Exchange management shell, run the command:
New-ManagementRoleAssignment –Role:ApplicationImpersonation –User:InsertNameOfServiceAccount
Remember to insert the name of your service account in the command. If you have named the service account as shown in step 1, the command should look like this:
New-ManagementRoleAssignment –Role:ApplicationImpersonation –User:serviceaccount
How to create a service account via the console/admin center
The steps below will use screenshots from the Office 365 Admin Center and the Exchange Admin Center. The procedure is the same across all versions of Exchange, but the exact method might vary slightly.
The 3 steps of the procedure
- Create an Exchange user (Service Account)
- Add the Service Account to a role group with ApplicationImpersonation
- Make sure that the Service Account is located in the same Exchange tenant/server as your resource calendars
**In order for you to be able to perform the following step you will need administrator access to your Exchange tenant**
Step 1: Create an Exchange user (Service Account)
- Go to the Office 365 Admin Center and click Add a user
- Fill in the user information and select the same domain as your resource calendars are using
- Create a password and make sure that the checkbox Make the user change their password when the first sign in is NOT checked.
Step 2: Add the Service Account to a role group with ApplicationImpersonation
- Go to the Office 365 Admin Center, click Admin Centers and select Exchange
- Go to permissions and click the "+" icon to create a new role group
- Give the role group a name, click the "+" icon under Roles to add the ApplicationImpersonation role and click the "+" icon under Members to add the Service Account to the role group. Click save to finish the role group.
Step 3: Make sure that the Service Account is located in the same Exchange tenant/server as your resource calendars
In order for the Service Account to have access to your resource calendars, it is important that both the Service Account and the resource calendars are located on the same Exchange tenant/server.
If you have done exactly as shown in the previous steps there is no need to check if this is the case, as long as you can manage the resource calendars from the Office 365 Admin Center.
However, if you have created the Service Account using another method, please make sure that your Service Account is using the same domain as the resource calendars.