Outlook integration¶
An Outlook integration can be added to your Drovio Server installation. It lets users schedule Drovio meetings right from their Outlook calendar: an Add a Drovio meeting button puts the link to join into the appointment, and sending the appointment keeps the meeting in line with its date, attendees and recurrence. You will need an app registration in Microsoft Entra ID.
The add-in works in Outlook on the web, the new Outlook on Windows, classic Outlook on Windows and Outlook on Mac. It signs its users in with their Microsoft account: the first time, they also sign in to your Drovio Server instance once, to link both accounts. Their Drovio account has to exist already.
The integration also lets the users of the Drovio app schedule a meeting with Outlook from its calendar button, with or without the add-in: see Schedule from the Drovio app.
HTTPS only
Outlook loads add-ins over HTTPS only. Your Drovio Server has to be reachable over HTTPS from the machines running Outlook.
Register the add-in in Microsoft Entra ID¶
In what follows, <your server> stands for the host name in the public URL of your
Drovio Server, for instance drovio.example.com.
You don't have to build the redirect URI and the Application ID URI by hand: the Outlook page of the administration panel shows both, ready to copy. Open Integrations, then Configure on the Outlook card.
The app registration can be done from the Azure portal, the Azure CLI, or
Terraform. All three produce the same result: a single-tenant app registration
with its redirect URI, its Application ID URI, the access_as_user scope, the
Office applications allowed to ask for it, version 2 tokens, and the admin consent.
No client secret is needed: the add-in never authenticates as the application.
The identifier ea5a67f6-b6f3-4338-b240-c655ddc3cc8e that all three use stands for
all the Office applications, which ask for a token on behalf of the add-in when
Outlook lacks nested app authentication.
Create the app registration¶
In the Azure portal, open Microsoft Entra ID, then App registrations, and New registration.
| Field | Value |
|---|---|
| Name | Any name, for instance Drovio Outlook |
| Supported account types | Accounts in this organizational directory only (single tenant) |
| Redirect URI | Single-page application (SPA), then brk-multihub://<your server> |
On the Overview pane, record:
| Value in Entra ID | Used as |
|---|---|
| Application (client) ID | client_id |
| Directory (tenant) ID | tenant_id |
Expose the API¶
Under Expose an API, click Add next to the Application ID URI, and enter the URI the administration panel shows once the Application ID is saved:
api://<your server>/<client id>
Then Add a scope:
| Field | Value |
|---|---|
| Scope name | access_as_user |
| Who can consent | Admins and users |
| Admin consent display name | Use Drovio as the user |
| Admin consent description | Lets Outlook sign the user in to Drovio. |
| State | Enabled |
Still under Expose an API, click Add a client application, enter
ea5a67f6-b6f3-4338-b240-c655ddc3cc8e and tick the access_as_user scope.
Ask for version 2 tokens¶
Under Manifest, set requestedAccessTokenVersion to 2, in the api
section, then Save. Drovio Server checks the tokens as Entra ID issues
them in that version.
Grant the consent¶
Under API permissions, Add a permission, open APIs my organization
uses, find the app registration by its name and add its access_as_user
delegated permission. Then click Grant admin consent for <your
tenant>, which spares each user the consent prompt.
The Azure CLI has no command for the scope, the Office applications or the
token version: the commands below set them through Microsoft Graph, with
az rest. Set the two names first, then the rest of the commands can be
pasted as they are:
| Variable | What it names |
|---|---|
SERVER_HOST |
Host name in the public URL of your Drovio Server |
APP_NAME |
Display name of the app registration |
Create the app registration, and gather what the next commands need:
APP_ID=$(az ad app create \
--display-name "$APP_NAME" \
--sign-in-audience AzureADMyOrg \
--query appId --output tsv)
OBJECT_ID=$(az ad app show --id "$APP_ID" --query id --output tsv)
TENANT_ID=$(az account show --query tenantId --output tsv)
SCOPE_ID=$(uuidgen | tr '[:upper:]' '[:lower:]')
OFFICE=ea5a67f6-b6f3-4338-b240-c655ddc3cc8e
Set the redirect URI, the Application ID URI, the scope and the token version:
cat > outlook-api.json <<EOF
{
"identifierUris": ["api://$SERVER_HOST/$APP_ID"],
"spa": { "redirectUris": ["brk-multihub://$SERVER_HOST"] },
"api": {
"requestedAccessTokenVersion": 2,
"oauth2PermissionScopes": [{
"id": "$SCOPE_ID",
"value": "access_as_user",
"type": "User",
"isEnabled": true,
"adminConsentDisplayName": "Use Drovio as the user",
"adminConsentDescription": "Lets Outlook sign the user in to Drovio.",
"userConsentDisplayName": "Use Drovio as you",
"userConsentDescription": "Lets Outlook sign you in to Drovio."
}]
}
}
EOF
az rest --method PATCH \
--uri "https://graph.microsoft.com/v1.0/applications/$OBJECT_ID" \
--headers Content-Type=application/json \
--body @outlook-api.json
Then allow the Office applications to ask for the scope, and let the app
registration request it, once the scope exists. This second request repeats
the whole api section, so that nothing of it is lost:
cat > outlook-access.json <<EOF
{
"api": {
"requestedAccessTokenVersion": 2,
"oauth2PermissionScopes": [{
"id": "$SCOPE_ID",
"value": "access_as_user",
"type": "User",
"isEnabled": true,
"adminConsentDisplayName": "Use Drovio as the user",
"adminConsentDescription": "Lets Outlook sign the user in to Drovio.",
"userConsentDisplayName": "Use Drovio as you",
"userConsentDescription": "Lets Outlook sign you in to Drovio."
}],
"preAuthorizedApplications": [{ "appId": "$OFFICE", "delegatedPermissionIds": ["$SCOPE_ID"] }]
},
"requiredResourceAccess": [{
"resourceAppId": "$APP_ID",
"resourceAccess": [{ "id": "$SCOPE_ID", "type": "Scope" }]
}]
}
EOF
az rest --method PATCH \
--uri "https://graph.microsoft.com/v1.0/applications/$OBJECT_ID" \
--headers Content-Type=application/json \
--body @outlook-access.json
echo "client_id $APP_ID (Application ID)"
echo "tenant_id $TENANT_ID (Directory ID)"
Grant the consent last¶
The consent needs the service principal of the app registration, which the portal creates on its own. As for any app registration, Microsoft Entra ID needs it to have propagated before it can act on it: run too early, the consent may grant nothing.
az ad sp create --id "$APP_ID"
az ad app permission admin-consent --id "$APP_ID"
SP_ID=$(az ad sp show --id "$APP_ID" --query id --output tsv)
az rest --method GET \
--url "https://graph.microsoft.com/v1.0/oauth2PermissionGrants?\$filter=clientId eq '$SP_ID'" \
--query "value[].scope" --output tsv
The last command has to print access_as_user. If it prints nothing, wait a
minute and run the last three commands again, or click Grant admin consent
for <your tenant> under API permissions in the portal. Granting the
consent needs the Cloud Application Administrator, the Privileged Role
Administrator or the Global Administrator role.
The same setup, for an infrastructure already described as code. It needs the
azuread provider in version 3 or above, which is where the small composable
application resources appeared, and signs in as the Azure CLI does. The files
below form one root module.
locals {
# The Office applications, which ask for a token on behalf of the add-in where Outlook lacks nested app authentication
office_client_id = "ea5a67f6-b6f3-4338-b240-c655ddc3cc8e"
}
resource "azuread_application_registration" "outlook" {
display_name = "Drovio Outlook"
sign_in_audience = "AzureADMyOrg"
requested_access_token_version = 2
}
resource "azuread_application_redirect_uris" "outlook" {
application_id = azuread_application_registration.outlook.id
type = "SPA"
redirect_uris = ["brk-multihub://${var.server_host}"]
}
resource "azuread_application_identifier_uri" "outlook" {
application_id = azuread_application_registration.outlook.id
identifier_uri = "api://${var.server_host}/${azuread_application_registration.outlook.client_id}"
}
resource "random_uuid" "access_as_user" {}
resource "azuread_application_permission_scope" "access_as_user" {
application_id = azuread_application_registration.outlook.id
scope_id = random_uuid.access_as_user.result
value = "access_as_user"
type = "User"
admin_consent_display_name = "Use Drovio as the user"
admin_consent_description = "Lets Outlook sign the user in to Drovio."
user_consent_display_name = "Use Drovio as you"
user_consent_description = "Lets Outlook sign you in to Drovio."
}
resource "azuread_application_pre_authorized" "office" {
application_id = azuread_application_registration.outlook.id
authorized_client_id = local.office_client_id
permission_ids = [azuread_application_permission_scope.access_as_user.scope_id]
}
resource "azuread_application_api_access" "outlook" {
application_id = azuread_application_registration.outlook.id
api_client_id = azuread_application_registration.outlook.client_id
scope_ids = [azuread_application_permission_scope.access_as_user.scope_id]
}
resource "azuread_service_principal" "outlook" {
client_id = azuread_application_registration.outlook.client_id
}
# The admin consent, for every user of the tenant
resource "azuread_service_principal_delegated_permission_grant" "outlook" {
service_principal_object_id = azuread_service_principal.outlook.object_id
resource_service_principal_object_id = azuread_service_principal.outlook.object_id
claim_values = [azuread_application_permission_scope.access_as_user.value]
}
output "client_id" {
description = "Application (client) ID, for the plugin configuration"
value = azuread_application_registration.outlook.client_id
}
output "tenant_id" {
description = "Directory (tenant) ID, for the plugin configuration"
value = data.azuread_client_config.current.tenant_id
}
output "identifier_uri" {
description = "Application ID URI, which the Outlook page of the administration panel shows as well"
value = azuread_application_identifier_uri.outlook.identifier_uri
}
Two things to know before applying this:
- The
azuread_service_principal_delegated_permission_grantresource is what Grant admin consent does in the portal. The identity running Terraform needs the Cloud Application Administrator, the Privileged Role Administrator or the Global Administrator role to create it. - The redirect URI and the Application ID URI hold the host name of your server: changing it means applying again, then deploying a new manifest of the add-in.
Configure the integration¶
In the administration panel, open Integrations, then Configure on the Outlook card.
| Field | Where it comes from |
|---|---|
| Status | Enabled or Disabled |
| Application ID | The client_id recorded in Entra ID |
| Tenant ID | The tenant_id recorded in Entra ID |
Saving takes effect on the next request, with no restart to perform. Once the Application ID is saved, the page shows the Application ID URI and the redirect URI that the app registration has to declare.
Turning the status to Disabled refuses the requests coming from Outlook, while leaving the page available to configure the integration.
Configuration reference¶
These are the keys of the outlook element of settings.conf, should you prefer
to edit it directly. In a cluster, the administration panel cannot save them: each
server reads its own settings file, which has to be edited on every one of them.
| Key | Default | Meaning |
|---|---|---|
enabled |
false |
Enable the integration |
client_id |
Application (client) ID of the app registration | |
tenant_id |
Directory (tenant) ID of the app registration, required to enable the integration | |
manifest_id |
Identifies the add-in in Microsoft 365. Set on the first save, don't edit | |
meeting_scheduling |
true |
Offers Outlook in the calendar button of the Drovio app, while the integration is enabled |
Deploy the add-in¶
The add-in is described by a manifest that points at your server. In the Outlook page of the administration panel, the Manifest section downloads it, filled in with the configuration saved.
In the Microsoft 365 admin center, go to Settings, then Integrated apps, and Upload custom apps. Choose Office Add-in, upload the manifest, then select the users or the groups to deploy it to. Deployment takes up to 24 hours to reach Outlook, sometimes more for classic Outlook on Windows.
Upgrading from Drovio Server 3.7.0
Drovio Server 3.7.1 brings a new version of the manifest, 1.0.1. Download it again from the administration panel once the server is upgraded, then in Integrated apps, open the Drovio add-in and replace its manifest with the new one, so that Outlook runs the add-in as this version expects.
Use the add-in¶
In an appointment the user organizes, the ribbon shows a Drovio group:
| Button | What it does |
|---|---|
| Add a Drovio meeting | Creates the Drovio meeting from the appointment, sets the link to join as the location and adds it to the invitation |
| Settings | Links the Microsoft account of the user to their Drovio account, shows the Drovio account the add-in is signed in to, and lets the user sign out |
When the appointment is sent, the add-in updates the Drovio meeting with the changes made since: subject, description, dates, attendees and recurrence. Drovio sends no invitation of its own: the Outlook invitation is the one the attendees receive.
Outlook on the web and the new Outlook
In Outlook on the web and the new Outlook on Windows, the add-in only runs on send when the appointment is open in a window of its own, with Open in new window. From the form that opens within the main window, or when the appointment is forwarded, the changes made after adding the Drovio meeting don't reach it.
Link the Drovio account¶
The first time, the add-in opens a window on your Drovio Server instance to link the Microsoft account of the user to their Drovio account:
- a user already signed in to Drovio in their browser is asked to confirm the account to link, with Connect;
- any other user signs in first, then confirms. The sign-in page is the one of your server, or a form of the integration when your server has none.
The link holds until the user signs out from Settings. It has to be completed within a quarter of an hour of opening the window: past that, the user starts again from Settings.
What the add-in leaves out¶
- Deleting or cancelling an appointment leaves its Drovio meeting: Outlook tells the add-ins nothing of it. The meeting keeps its dates and its link, and moves to the past once they are over.
- Moving an appointment in the calendar, by dragging it, goes through the appointment form, which Outlook opens to send the update to the attendees: the Drovio meeting follows.
Schedule from the Drovio app¶
While the integration is enabled and meeting_scheduling is on, the calendar
button of the Drovio app offers Outlook. Choosing it creates a Drovio meeting for
the user, then opens a new event of Outlook on the web filled in with its link to
join, as its location and in its description. The subject and the description are
written in the language of the Drovio account of the user.
The Drovio meeting starts when the user chooses Outlook and lasts an hour, since nothing tells your server when the event takes place:
- with the add-in deployed, sending the event takes the meeting over: the add-in finds its link in the event and brings the meeting in line with it, as if it had created it;
- without the add-in, the meeting keeps its own dates, and its link joins it at any time.
The app shows the calendar button from Drovio app 3.7.1, with the means of scheduling the integrations of your server offer: none hides it, one opens it directly, several open a menu. See Drovio app.