---
title: "Settings for API operations"
canonical: "https://docs.cuesystem.com/space/M3SG/285933569/Settings%20for%20API%20operations"
format: markdown
---
> ℹ️ This chapter applies **only to CUE Solution users**. If you are using Essential setup or touchONE-manager to manage reservation units, the settings in this chapter are not necessary.

API operations require certain settings in the Microsoft 365 environment to minimize communication with calendar servers and to provide sufficient response speed for a large number of resources. API operations are used for the following purposes:

- event confirmation
- processing analytics data
- caching and prefetching calendar data for CUE Assist app
- processing of the orders from CUE Assist app

In order to avoid having to read the calendars of all resources, which could take a long time in case of a large number, messages about changes in the calendars are sent to **one delegate (service) account**. This account then processes only the necessary events and performs the required actions. This radically reduces the number of necessary communication transactions with the calendar servers. **This service account is used in the Connection agent for API operations**.

> ℹ️ This setting is **only required for Microsoft 365**. Starting with CUE Solution version 10, it is not used for the Microsoft Exchange On-prem calendar server.

# Create group

Create a group with all resources used in CUE Admin.

- [Log in to the Microsoft 365 Admin Center](https://login.microsoftonline.com)* *as an administrator. Depending on what you use, log in to either Microsoft 365 administration or Exchange Admin Center for Exchange on-prem.
- Go to *Groups / Active groups* and select *Add a group*. Then select ***Mail-enabled security group*** type and tap *Next.*
- Enter name of the group, e.g. <span style="color: #0747a6">*TouchoneResourcesGroup*</span> and tap *Next*.
- Enter email address of those security group, e.g. <span style="color: #0747a6">*TouchoneResourcesGroup@contoso.com*</span>. Uncheck the box *Allow people outside of my organization to send email to this Mail-enabled security group* and tap *Next*.
- Check parameters of this new group and tap button *Create group*.

# Add resources to the group

Now you need to add all resources managed using the CUE Solution to this group:

- Double click on the group in *Groups / Active groups* page and select *Members* tab. Then tap *View all and manage members*. Click on *Add members*, select the resources and confirm with the *Save* button.
- Alternatively, you can use the [PowerShell](https://cue.atlassian.net/wiki/spaces/M3SG/pages/211288092) command for each resource:  
*Add-DistributionGroupMember -Identity < GROUPNAME > -Member < USEREMAIL >*  
Example: *Add-DistributionGroupMember -Identity “TouchoneResourcesGroup” -Member “room01@contoso.com”*

# Create a dedicated delegate account

Because the account used for event confirmation will handle a large number of messages and will be heavily loaded, we recommend that you create a dedicated delegate (service) account that will be used only for API operations purposes. In the following examples, this account will be named <span style="color: #0747a6">*ApiWorker@contoso.com*</span>. For details on creating a service account, see [Service account creating](https://cue.atlassian.net/wiki/spaces/M3SG/pages/204669121). The delegate (service) account needs [full access](/wiki/spaces/M3SG/pages/211288071#Full_access_for_service_account_Microsoft365) to all resources used in CUE Solution.

# Mail flow settings

In the last step, the mail flow is set up so that messages about changes in the calendar of resources are forwarded to the dedicated service account.

> ⚠️ If you use other mail flow rules for other purposes, you must ensure that the following rule is always implemented and not blocked by other rules, or that this new mail flow rule does not negatively affect other rules. You can ensure this by setting the correct priorities for the rules, or by setting the *Stop processing more rules* checkbox in each rule appropriately.
> ⚠️ 
> ⚠️ In general it is not possible to say whether *Stop processing more rules* should be enabled or disabled, it depends on how the other rules are set up.

- If you are not already logged in, [log in to the ](https://cue.atlassian.net/wiki/spaces/M3SG/pages/280690735)*[Microsoft 365 admin center](https://cue.atlassian.net/wiki/spaces/M3SG/pages/280690735)* as an administrator.
- Go to *Exchange Admin Center* (click *Show all* and select *Exchange Admin Center*).
- Select *Mail flow* and *Rules*.
- Click *+* and *Create a new rule…*.
- Click on *More options* at the bottom of the window.
- Enter name for this rule, e.g. <span style="color: #0747a6">*InformApiWorker*</span>.
- In the field **Apply this rule if…* select *The recipient…* and *is a member of…* and *is a member of this group*, then select group of confirmed resources, e.g. <span style="color: #0747a6">*TouchoneResourcesGroup@contoso.com*</span>.
- In the field **Do the following…* select *Add recipients…* and *to the To box…* and then select delegate account dedicated for confirmation, e.g. <span style="color: #0747a6">*ApiWorker@contoso.com*</span>.
- Set the *Stop processing more rules* checkbox so that this rule does not negatively affect other mail flow rules, as described above. If you do not use other mail flow rules, check it.
- Save the rule with the *Save* button.
- Make sure the rule is enabled by checking the *ON* check box in the left column.