---
title: "Connection agent for API operations"
canonical: "https://docs.cuesystem.com/space/TAM/243105793/Connection%20agent%20for%20API%20operations"
format: markdown
---
It uses touchONE-server for background operations such as reading and confirming reservations and processing analytics data. It can also be used on the Exchange server to read the time zone and working hours of resource accounts.

![image](media://1c44d2a5-8948-4d19-9fd4-235203dd9735)

API operations are performed on the following servers:

- Microsoft 365 using Microsoft Graph
- Exchange server using EWS (Exchange Web Services)
- Google Workspace using Google Calendar API

> ⚠️ To use the following features in Microsoft 365:
> ⚠️ 
> ⚠️ - event confirmation
> ⚠️ - processing analytics data
> ⚠️ - caching and prefetching calendar data for CUE Assist
> ⚠️ - processing of the orders from CUE Assist
> ⚠️ 
> ⚠️ you need to set up **a mailflow for the service account **of this connection agent. The procedure for setting up mailflow is described [here](https://cue.atlassian.net/wiki/spaces/M3SG/pages/285933569).

For details, expand the procedures for the given server types below:

<details>
<summary>Microsoft 365</summary>

Connection agent for API operations in Microsoft 365 needs an application registered in Azure AD. The procedure for creating an application is described here: [Registered app creating](https://cue.atlassian.net/wiki/spaces/M3SG/pages/255950885)

Use the procedure **Configuration For API operations** or **Configuration for Common app**.

> Macro (excerpt-include)



> ℹ️ For such a service account you also need to  **set up the email flow** [as described here.](https://cue.atlassian.net/wiki/spaces/M3SG/pages/285933569)

> Macro (excerpt-include)



To create a new connection agent, press the <span style="color: #0747a6">***+ NEW***</span> button in the top right corner and then <span style="color: #0747a6">***NEW MICROSOFT 365***</span> in the section **For API operations**.

![image](media://d3ee738a-9730-4a6c-9d42-b81df880513a)

> Macro (excerpt-include)



> Macro (excerpt-include)



#### > Macro (excerpt-include)



#### > Macro (excerpt-include)



#### > Macro (excerpt-include)



#### Username

Enter here the username of the service account used for API operations. For Microsoft 365, the username is typically in the email format, e.g. **apiworker@contoso.com**.

> Macro (excerpt-include)



> Macro (excerpt-include)



> Macro (excerpt-include)

  

> Macro (excerpt-include)
</details>

<details>
<summary>Exchange server</summary>

For Exchange, you need the address of the Exchange server. EWS (Exchange Web Services) is used for communication.

> Macro (excerpt-include)

  

To create a new connection agent, press the <span style="color: #0747a6">***+ NEW***</span> button in the top right corner and then <span style="color: #0747a6">***NEW EXCHANGE***</span> in the section **For API operations**.

![image](media://c9ba6c40-f8cf-4cf0-97d1-55e227ac96a2)

> Macro (excerpt-include)



> Macro (excerpt-include)

  

#### Username

Enter here the email of the service account used for API operations, e.g. **apiworker@contoso.com**.

> Macro (excerpt-include)

 

> Macro (excerpt-include)

 

> Macro (excerpt-include)
</details>

<details>
<summary>Google Workspace</summary>

For Google Workspace, you need a project with the appropriate APIs enabled and a certificate for secure communication. The procedure for creating a project and a certificate is described here: [Configuration process](https://cue.atlassian.net/wiki/spaces/GWSG/pages/198672847)

To create a new connection agent, press the <span style="color: #0747a6">***+ NEW***</span> button in the top right corner and then <span style="color: #0747a6">***NEW GOOGLE***</span> in the section **For API operations**.

![image](media://29a1d373-d0ff-4bd6-ad74-5ca782d5e2b6)

> Macro (excerpt-include)



> Macro (excerpt-include)



> Macro (excerpt-include)

 

> Macro (excerpt-include)
</details>

> Macro (excerpt)
> 
> ### Test connection agent
> 
> Press the <span style="color: #0747a6">***TEST ***</span>button to test communication with calendar server.
> 
> If the communication with the server goes well, the message <span style="color: #006644">**Test was successfull**</span> will be displayed, otherwise the errors that occurred will be listed.
> 
> Tap <span style="color: #0747a6">***SAVE***</span><span style="color: #0747a6">* *</span>in the right top corner to save changes or <span style="color: #0747a6">***←***</span> in the left top corner to leave the window without saving.

> Macro (excerpt)
> 
> For this connection agent, you need to have a service account with a password on whose behalf the requested API operations are performed.
> 
> > ℹ️ If you are using the connection agent to confirm reservations and/or for processing analytics data, we strongly recommend using a **dedicated service account that is not used for other purposes and in other connection agents**. This service account needs **[full access to the resource calendars](/wiki/spaces/M3SG/pages/211288071#Full_access_for_service_account_Microsoft365)** where it will perform reservation confirmations.