# Connect Microsoft 365: Outlook calendar and Teams

> Connect Microsoft 365 to create Teams meetings, block time in your Outlook calendar, and reschedule or cancel meetings, with what happens when Microsoft fails.

Source: https://docs.theavoxai.com/connections/apps/microsoft-365

Connect Microsoft 365 and Avox can put meetings and blocked time in your Outlook calendar, add a
Microsoft Teams link to a meeting, and let you reschedule or cancel what Avox created.

## What Avox can and cannot do with Microsoft 365

Avox can:

- **Create a meeting**: an Outlook event with a Teams link. Guests get Outlook's own invitation.
- **Reschedule or cancel a meeting** from its page in Avox, until it starts.
- **Block time**: a busy event with its reminder off, so nobody books over it.

Avox cannot:

- Make a Teams link for a personal Microsoft account. A personal account gets the Outlook event
  without a Teams link. Teams links need a work or school account.
- Check your free and busy times before it books. Avox can ask Outlook for them, but no automation
  step or screen uses that, so a new meeting is created even if the time is taken.
- Remove blocked time from an automation. Remove it from **Meetings** in Avox or in Outlook.
- Use any calendar except your main Outlook calendar, or read email, files or contacts. It only
  asks to see and change your calendar.

## What you need

- A Microsoft account. For Teams links, a work or school account. Some work accounts need an IT
  admin to approve apps before you can connect.
- Room in your plan for another app.
- The **Manage connected apps** permission (**Settings**, then **Switchboard**). Admins have it, and
  an Admin can give it to a Manager.

## Connect Microsoft 365

**1. Open Microsoft 365 in Apps**

In the sidebar open **Apps**, then **Microsoft 365**, and click **Connect**. The first screen lists
what Avox will be allowed to do. Click **Continue**, then **Continue to Microsoft 365**.

**2. Choose the account**

Microsoft asks which account to use. Pick the one whose calendar you want Avox to use.

**3. Accept the permissions**

Accept what Avox asks for (see the table). You come back to Avox, which shows Microsoft 365 as
connected, with the account's email.

| Permission Avox asks for | What it allows |
| --- | --- |
| Sign in and read your profile | Knowing which account this is. Required. |
| See and change your Outlook calendar | Meetings and blocked time |

If the profile permission is not allowed, nothing is connected ([AVX-3690](https://docs.theavoxai.com/error-codes/avx-3690)).
If the calendar permission is missing, Avox connects but its **Overview** lists what is missing, and
meeting steps are refused with the same code until you click **Reconnect** and accept it.

> **Note**
>
> **Coming soon** means Avox's Microsoft sign-in is not switched on yet ([AVX-3682](https://docs.theavoxai.com/error-codes/avx-3682)). A greyed-out **Connect** can also mean your role lacks the permission ([AVX-3707](https://docs.theavoxai.com/error-codes/avx-3707)), the Switchboard has no plan ([AVX-3706](https://docs.theavoxai.com/error-codes/avx-3706)), or your plan's apps are all connected ([AVX-3683](https://docs.theavoxai.com/error-codes/avx-3683)).

## What you see in Avox afterwards

Open **Apps**, then **Microsoft 365**. The menu (tabs along the top on a phone) has **Overview**,
**Meetings** and **Activity**.

- **Overview**: the status (**Connected**, **Needs reconnecting** or **Having trouble**), the
  account, when it last worked, the last problem with its code, permissions not allowed, and **Used
  for** (what uses Microsoft 365). **Test connection** asks Microsoft whether it still accepts
  Avox's access.
- **Meetings**: **Sent by Avox** lists meetings and blocked time Avox made. **In Microsoft 365**
  lists your Outlook calendar from an hour ago to 180 days ahead, in start order. Open one for its
  time, guests, Teams link and notes. **Reschedule** and **Cancel meeting** work until it starts.
- **Activity**: **Usage** and **Log** of every call Avox made.

## Using Microsoft 365 in Avox

In an automation add **Use a connected app**, pick **What to do**, then pick Microsoft 365 under
**With**.

| Step | What it does | Values it gives back |
| --- | --- | --- |
| Create a video meeting | An Outlook event with a Teams link and up to 20 guests | `{{meeting.join_url}}`, `{{meeting.id}}` |
| Block time in a calendar | A busy event | `{{calendar.event_id}}` |

You can rename the values in the step. See [Tables and Flows](https://docs.theavoxai.com/automation/tables) for how they
work. If another meeting app is connected too, pick the one you want in **With**.

**Flows.** A Flow does not call Microsoft by itself. An automation that starts with **Flow
submitted** can use these steps with the customer's answers, like `{{flow.email}}`. To put the
bookings of the premade appointment booking Flow in Outlook, add an automation with the **Booking
made** trigger on your Appointments table.

**Times.** **Starts** needs a full date and time, with the year, month and day. Avox turns it into
one exact moment and sends it to Microsoft in universal time, so the meeting happens at the same
time wherever you or your customer are. Outlook shows it in your own calendar's time zone; the
step's **Time zone** box does not change that. A meeting is 5 to 720 minutes long, and its title can
have up to 200 characters. If Avox cannot read the date and time, the step fails before anything is
sent to Microsoft.

> **Tip**
>
> After the first run, open the meeting in Outlook and check its time.

**Example (made up).** When a booking is added to a table, a **Create a video meeting** step makes
a Teams meeting, then a message step sends `{{meeting.join_url}}` to the customer. Avox does not
message the link by itself.

**Cancelling.** **Cancel meeting** has a switch, **Tell the guests it's cancelled**, on by default.
If Outlook cannot send the cancellation, Avox removes the event from your calendar instead.

## Limits

- 120 calls a minute per Switchboard to Microsoft. Past that, calls are refused with
  [AVX-3695](https://docs.theavoxai.com/error-codes/avx-3695) until the minute passes.
- Each call gives up after 10 seconds.
- A meeting has up to 20 guests and a description of up to 2,000 characters.
- A rescheduled start must be a minute to a year ahead ([AVX-3722](https://docs.theavoxai.com/error-codes/avx-3722)).

## When Microsoft fails or says no

1. **Avox tries again when that is safe.** Reads, moves and removals are tried up to two more times
   (after about 0.4 seconds, then 1.2 seconds) if Microsoft is busy or cannot be reached. If
   Microsoft says how long to wait, Avox waits up to 5 seconds. Creating a meeting, blocking time
   and sending a cancellation to guests are **not** retried, because a repeat could make a second
   copy or send two notices. If one of those fails with a timeout, check Outlook before you run it
   again: Microsoft may have done it just as the answer got lost.
2. **The status changes only when it should.** If Microsoft stops accepting Avox's access, the status
   becomes **Needs reconnecting** at once. Five failed calls in a row on Microsoft's side make it
   **Having trouble**. One good call, or a passing **Test connection**, puts it back to **Connected**
   by itself. A bad detail in a step, a permission that was not allowed, Avox's own 120 a minute
   brake and a paused Switchboard do not count against it.
3. **The call is logged.** **Activity** keeps the time, action, source, result, number of tries and
   Microsoft's reason. Emails and phone numbers are masked and sign-in details are never kept.
4. **Your automation follows your choice.** Each step has **If it can't be done**: **Stop the run**
   or **Carry on with the next step**. While Microsoft **Needs reconnecting**, or the Switchboard is
   paused, Avox does not call Microsoft at all. The step ends as "the app isn't connected"
   ([AVX-3596](https://docs.theavoxai.com/error-codes/avx-3596)) and follows the same choice. Other steps, your Inbox and
   automations without Microsoft carry on.
5. **Pages show what Avox saved.** If Outlook cannot be read, **Meetings** shows what Avox saved
   ([AVX-3717](https://docs.theavoxai.com/error-codes/avx-3717)), with the reason's code. Click **Refresh** later.
   **Reschedule** and **Cancel meeting** wait until Microsoft answers.

**What happens to a meeting or a block.** When Microsoft confirms, Avox saves a record (title, time,
guest count, and the Teams link without its passcode) under **Sent by Avox**. When a call fails,
nothing is saved. Avox does not retry a create, so one failed attempt never becomes two meetings. A
meeting that already exists stays in Outlook even if Microsoft fails later or you disconnect. If a
reschedule or cancel fails, the event is unchanged.

| Code | What it means here |
| --- | --- |
| [AVX-3692](https://docs.theavoxai.com/error-codes/avx-3692) | Microsoft's access was removed or ran out. Click **Reconnect**. |
| [AVX-3690](https://docs.theavoxai.com/error-codes/avx-3690) | A permission was not allowed. Reconnect and accept it. |
| [AVX-3694](https://docs.theavoxai.com/error-codes/avx-3694) | Microsoft is not answering. Avox already retried where it could. |
| [AVX-3695](https://docs.theavoxai.com/error-codes/avx-3695) | Microsoft or Avox asked for a slower pace. Try again in a minute. |
| [AVX-3713](https://docs.theavoxai.com/error-codes/avx-3713) | Microsoft refused the request. The log entry has its reason. |
| [AVX-3705](https://docs.theavoxai.com/error-codes/avx-3705) | A detail is missing or not valid, like the start time or a guest's email. |
| [AVX-3721](https://docs.theavoxai.com/error-codes/avx-3721) | The meeting cannot be cancelled or moved now, for example it already started. |
| [AVX-3711](https://docs.theavoxai.com/error-codes/avx-3711) | The Switchboard is paused. |

A detail Microsoft calls invalid or cannot find does not count against the status. Other refusals
do.

## Disconnect Microsoft 365

Open **Microsoft 365**, then **Disconnect**. Avox first lists what uses it: those steps stop until
you connect again ([AVX-3708](https://docs.theavoxai.com/error-codes/avx-3708)). Click **Disconnect** to confirm, or **Keep it
connected**.

- Avox deletes the sign-in it saved. The log and usage stay for your retention period. Meetings in
  your calendar stay too.
- Microsoft gives apps no way to take their own access back. To fully remove Avox, open your
  account's app permissions yourself: `myapps.microsoft.com` for work or school accounts, or
  `account.live.com/consent/Manage` for personal ones.

## Common questions

**Why is there no Teams link on my meeting?**

Teams links need a work or school account. A personal Microsoft account gets the Outlook event
without a link.

**My IT admin has to approve Avox. What do I ask for?**

Ask them to allow Avox to sign in and read the user's profile, and to see and change the user's
calendar. Those are the two permissions in the table above.

**Can I connect two Microsoft accounts?**

One account per Switchboard. Signing in with a different account while reconnecting is refused
([AVX-3703](https://docs.theavoxai.com/error-codes/avx-3703)). Disconnect first to switch accounts.

## Related
