# Setup the SalesTim Connector for Logic Apps
Abstract
This article explains how to register the SalesTim Connector as a custom connector for Azure Logic Apps (opens new window).
⏱ Expected Duration
Creating the custom connector only requires a few operations that are described hereafter as a detailed step-by-step procedure. Assuming you have all the required access and permissions to execute it properly, it should take less than 10 minutes.
TABLE OF CONTENTS:
# Procedure Overview
Here is an overview of the overall procedure:
# 1. Create a new app registration in Azure Active Directory
To securely access your Microsoft 365 environment through the Microsoft Graph APIs, the first step is to create a dedicated app registration. An Azure AD app registration identifies a third-party app such as SalesTim, and defines the permissions you wan to grant to it. To learn more, you can refer to How and why applications are added to Azure AD (opens new window).
To create a new app registration, follow these steps:
- Open your Azure Active Directory portal (opens new window)
- Select
App registrations
from the left menu - Click
New registration
from the top bar - Give the app a name, such as:
SalesTim Logic Apps Connector
- Select the option
Accounts in this organizational directory only
, as you want to restrict access to your own tenant. - Use this web redirection URL:
https://global.consent.azure-apim.net/redirect
- Click
Register
- From the
Overview
menu, copy theApplication (client) ID
, and keep it as we're gonna reuse it later. You can temporarily paste it here:
Application (client) ID:
- Open the
Authentication
menu - Ensure that the
Access tokens (used for implicit flows)
andID tokens (used for implicit and hybrid flows)
options are chacked from theImplicit grant and hybrid flows
section, and save your updates if required. - Open the
Certificates and secrets
menu and clickNew client secret
. A client secret is a kind of a password for your app, so manage it carefully. - Give a name to your client secret such as:
SalesTim Logic Apps Connector client secret
- Select the expiration option, and click
Add
- Copy the
Client secret
value (be careful, it will only be shown once), and keep it as we're gonna reuse it later. You can temporarily paste it here:
Client secret:
- Open the
API permissions
from the left menu and clickAdd a permission
from the top bar - Select
Microsoft Graph
, thenDelegated permissions
- From the permissions list, select:
- OpenId permissions >
email
offline_access
openid
profile
- Directory >
Directory.AccessAsUser.All
- Group >
Group.ReadWrite.All
- InformationProtectionPolicy >
InformationProtectionPolicy.Read
- Mail >
Mail.Send
- User >
User.Read
User.Read.All
- OpenId permissions >
- Click
Add permissions
- Then click
Grant admin consent for...
thenYes
You're done, you've created your app registration for the SalesTim Connector. You should also have saved for later the Application (client) ID
and Client secret
that we're gonna use in the next steps.
# 2. Create an Azure Custom Connector Resource
In Azure Logic Apps, you must first create the custom connector resource (steps below) before defining the behavior of the connector using an OpenAPI definition.
- In the Azure portal, on the
Azure services
menu, chooseCreate a resource
. - In New, enter
logic apps custom connector
in the search box as your filter. SelectLogic Apps Custom Connector
from the drop-down box. - In
Logic Apps Custom Connector
, selectCreate
. - Provide details for registering your connector. When you're done, choose
Review + create
.
Once you've created the custom connector resource, the custom connector menu should open automatically. If it doesn't, you can go to the subscription and resource group you selected and open it directly. Now that you have a custom connector, you can define the connector's behavior.
Note
For reference, see Create a custom connector in Azure Logic Apps (opens new window)
# 3. Import the SalesTim OpenAPI definition
Now that we've created both the app registration and the logic apps resource, we're gonna use it to create our custom connector.
- Go to the Azure portal, and open the Logic Apps connector you created earlier in
Create an Azure Logic Apps custom connector
. - In your connector's menu, choose
Logic Apps Connector
, then chooseEdit
. - Under
Custom connectors
, selectREST
- From
Import mode
, selectOpenAPI URL
and and paste this URL:
https://developers.salestim.com/api/definitions/v1.0/open-api/power-platform/apiDefinition.swagger.json
- Click
Import
- From the
General information
section, give your connector a name, such as:
SalesTim
- Upload the connector logo that you can download from:
https://www.salestim.com/wp-content/uploads/2019/05/color.png
- Set the icon background color to:
#000000
- Click
Security
- Ensure that the authentication type is set to
OAuth 2.0
and the identity provider is set toAzure Active Directory
- Paste the previously copied
Client id
andClient secret
- Ensure that the login url is set to:
https://login.windows.net
- Ensure that the tenant ID is set to:
common
- Set the resource URL to:
https://graph.microsoft.com
- Set the scope to:
https://graph.microsoft.com/.default
- Click
Update connector
- From the
Security
page, copy the generatedRedirect URL
, and keep it as we're gonna reuse it later. You can temporarily paste it here:
Redirect URL:
- Navigate back to your app registration, open the
Authentication
menu - From the
Web
section, add the previously copied URL to the list ofRedirect URIs
- Click
Save
Note
For reference, see Import the OpenAPI definition for Logic Apps (opens new window)
# 4. Next Steps
Now that you've created the SalesTim connector, you can use it from your Azure Logic Apps (opens new window) environment. See the available Triggers and Actions for reference.
💡 To Go Further
Here are a few interesting articles that may give you some guidelines and new ideas on how to use the the SalesTim Connector: