- Print
Connect the Microsoft Graph API to Tulip with Oauth2
Microsoft Graph API allows the users to interface with Microsoft apps like Teams, Outlook, and Office Suite.
Purpose
Use this document to integrate your Tulip Apps with Microsoft 365 products like Teams, Office Suite, and Outlook.
First-Time Setup
Outline
The following steps must be completed to generate the proper authentication information to use the MS Graph API:
Some of these steps require advanced permissions in Microsoft Azure. Be sure the user has sufficient permissions to Register & Manage an Entra ID Application before continuing!
- Register a new Application in Microsoft Azure.
- Create a new Client Secret for the Application and declare permissions.
- Copy the Client Secret & related authentication information to the Tulip Oauth2 Connector Configuration.
In Detail: First-Time Setup
1. Registering a new Application in Microsoft Azure
- Navigate to portal.azure.com in a web browser.
- Log in with your organization's credentials.
- Select Microsoft Entra ID.
- Note: formerly known as Azure Active Directory, you may need to select "More Services" to find this option.
- In the menu on the left side of the page, select App Registrations.
- Select New Registration and enter a Name.
- Under Redirect URI, ensure Web is selected and enter the following URL:
https://<your Tulip Instance>/oauth-redirect-handler
for example, the redirect URI for sample.tulip.co would behttps://sample.tulip.co/oauth-redirect-handler
. - Select Register to create the Azure App.
2. Recording Required Information
After registering the App, you'll be forwarded to the new Azure App's configuration page. Copy the following information to a Notepad or text file for later use:
- Select Overview from the left-side menu and record:
- the Application (client) ID, and
- the Directory (tenant) ID.
- Select API Permissions from the left-side menu.
- Select Application Permissions.
- Select Microsoft Graph to view all possible permissions for Tulip to have over the Graph API.
- Select any permissions you wish your Tulip Connector to have. A complete list of permissions can be found here.
- Note 1: as a recommendation, use ctrl/cmd + f and search for the Microsoft App you wish to use. For example, search for "Teams" to find permissions related to Channels and Chat.
- Note 2: If using this guide to integrate a Tulip Library Connector, a list of permissions the Connector needs to function can be found in the related Tulip Knowledge Base article.
- Record the API/Permissions Name of all permissions selected, such as
Files.Read.All
orUser.Read
.
3. Generating Authentication Information
- Select Certificates & secrets from the Manage menu on the left side of the App's Azure configuration page.
- Select Client secrets (0).
- Select New client secret and name the new secret.
- Copy the Value shown.
4. Adding Authentication Information to Tulip Connector
Navigate to the Configuration settings of the Tulip Connector you wish to use with the MS Graph API. This can be done by clicking the box labeled OFFLINE - production & testing & develompent on the Connector's main page.
- Select Edit Headers.
- Under Authentication, select either:
- Oauth2 (Operator) if the app user should have to log into MS 365 whenever they run an integrated Tulip App.
- Oauth2 (Service Accounts) if Tulip should only authenticate to MS 365 when this configuration is set or changed, and use this login information for all apps on your Tulip Instance.
- Enter the following information recorded previously for the rest of the options:
- Authorization Code URL:
https://login.microsoftonline.com/
the Directory (tenant) ID from Step 2.1.b/oauth2/v2.0/authorize
- Access Token URL:
https://login.microsoftonline.com/
the Directory (tenant) ID from Step 2.1.b/oauth2/v2.0/token
- Client ID: the Application (client) ID from Step 2.1.a
- Client Secret: the Value from Step 3.4
- Scope: a comma-separated list of the Permission Names added in Step 2.6, such as
Files.Read.All,User.Read
- Authorization Code URL:
- Select Test to test the authentication method.
- Select Back to return to the Connector Configuration.
- Finally, on the Enter Connection Details screen enter the following information:
- Running On: Select Cloud Connector Host unless known otherwise.
- Host: graph.microsoft.com
- Port: 443 (or leave blank)TLS
- TLS : Yes
- Select Test, and configuration is complete!
5. Example
Watch the video below to see an example of the written content above.
Video of setting up the connector for excel: