# Setup the SalesTim Connector for Power Platform

Abstract
This article explains how to register the SalesTim Connector as a custom connector for Microsoft Power Platform (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:

SalesTim Power Platform 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 the Application (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) and ID tokens (used for implicit and hybrid flows) options are checked from the Implicit grant and hybrid flows section, and save your updates if required.
  • Open the Certificates and secrets menu and click New 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 Power Platform 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 click Add a permission from the top bar
  • Select Microsoft Graph, then Delegated 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
  • Click Add permissions
  • Then click Grant admin consent for... then Yes

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. Import the SalesTim OpenAPI definition

Now that we've created the app registration, we're gonna use it to create our custom connector.

TIP

The custom connector you're about to create will be available for both PowerApps and Power Automate, as they're sharing the same list of connectors.

  • In the navigation pane, select Data then Custom connectors.
  • Select New custom connector then choose Import an OpenAPI from URL
  • Give your connector a name, such as :
SalesTim
  • Paste this URL:
https://developers.salestim.com/api/definitions/v1.0/open-api/power-platform/apiDefinition.swagger.json
  • Click Import, then Continue
  • 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 to Azure Active Directory
  • Paste the previously copied Client id and Client 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 Create connector, then Close

# 3. Update the Power Platform Connector

To update your Power Platform connector:

https://developers.salestim.com/api/definitions/v1.0/open-api/power-platform/apiDefinition.swagger.yaml
  • Copy the whole content
  • From Power Apps or Power Automate, open your custom connector from the Data \ Custom connectors menu
  • Click on Swagger Editor
  • From the left page, replace the content by pasting the updated connector definition
  • Click Update connector

# 4. Next Steps

Now that you've created the SalesTim connector, you can use it from Power Apps (opens new window), Power Automate (opens new window), and Power BI (opens new window). 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:

classification:PUBLIC