Skip to main content

Connection - Office365​

The Office365 Connection stores the sign-in and security settings that these Tasks and Triggers use to connect to Office 365 calendars and Microsoft Teams:

It signs in with OAuth through an application registered in Microsoft Entra ID.

Common settings​

Office365 Connection, Common settings tab

The Common settings and Proxy tabs are the same for every Connection type that has them; see Common settings and Proxy.

An Office365 Connection has no Test button; Authenticate shows whether the sign-in works.

Main settings​

Office365 Connection, Main settings tab

These fields are on Connection settings -> Main settings, in two groups: Credentials and App settings.

Credentials​

Client ID

The Application (client) ID of the application, from its Overview page in the Azure portal.

The Overview page of an app registration

Client Secret

A client secret of the application.

The Certificates & secrets page of an app registration

Redirect URI

The address that Microsoft sends the sign-in result to. It is the same setting as Redirect Url under App settings; see Redirect Url. Add the address as a redirect URI of the application.

The redirect URI of an app registration

Auto-accept server certificates

The same setting as the box under App settings.

Create an account

Opens the App registrations page of the Azure portal.

The sign-in asks for these delegated Microsoft Graph permissions: Calendars.ReadWrite, Group.ReadWrite.All and User.ReadWrite.All. Add them to the application under API permissions. Group.ReadWrite.All and User.ReadWrite.All need admin consent and apply to the whole tenant.

The API permissions page of an app registration

Authenticate

Starts the Microsoft sign-in. The browser opens on the computer where the Client runs, and the Client listens for the result on the port of the redirect address. After the sign-in, the Connection stores the sign-in, and the Tasks refresh it at run time.

App settings​

Office365 Connection, Main settings tab, App settings group

Redirect Url

The redirect address of the Connection. Redirect URI under Credentials and Redirect Url are one setting: when they differ, the value in Redirect Url is saved. Enter the same address in both, for example "http://localhost:9999".

Tenant Id

Filled in with the tenant of the signed-in account after Authenticate.

Tenant Name

Not used by the Tasks.

Tenant Primary Domain

The primary domain of the tenant, for example <tenant>.onmicrosoft.com. The sign-in and the Tasks use it to find the tenant. When it is empty, they use the multi-tenant sign-in address, which an application registered for a single tenant does not accept. Fill it in for a single-tenant application.

Auto-accept server certificates

The Office365 Tasks, the Microsoft Teams Task and the MSTeams Trigger do not use this setting.

Proxy​

Office365 Connection, Proxy tab

warning

The Office365 Tasks, the Microsoft Teams Task and the MSTeams Trigger do not use the Proxy tab. Make sure that the Server can reach Microsoft 365 without the proxy on this tab.

Troubleshooting​

Token null / empty​

Possible causes:

  • The redirect address in the Connection does not match a redirect URI of the application in the Azure portal
  • Another program already listens on the port of the redirect address on the Client computer, for example a local web server on port 80
  • A firewall on the computer that runs the Client blocks the redirect from the browser
  • The sign-in failed, for example because of a wrong password or a closed sign-in window