Views:

This guide walks you through manually importing and configuring the North52 Execute Formula custom connector using the OpenAPI (YAML) definition file. The connector allows execution of North52 Formulas from Power Automate flows and Copilot agents without the need for a Custom Action.


Prerequisites

  • North52 Business Process Activities installed in your Dynamics 365 / Dataverse environment
  • Power Automate Premium licence (required for custom connectors)
  • Access to Azure portal to create an App Registration
  • System Administrator or Environment Maker role in Power Platform
  • The connector YAML file: North52-Execute-Formula.swagger.json (click to download)
  • The North52 logo file: North52Logo128x128.png (click to download) 

Step 1 – Create an Azure AD App Registration

The connector authenticates to Dataverse using OAuth 2.0. You need to register an application in Microsoft Entra ID (Azure AD) to obtain a Client ID and Client Secret.

1.1 Register the Application

  1. Sign in to https://portal.azure.com
  2. Navigate to Microsoft Entra ID > App registrations
  3. Click New registration
  4. Enter a name, for example: North52 Execute Formula Connector
  5. Under Supported account types, select Accounts in this organizational directory only (Single tenant)
  6. Leave the Redirect URI blank for now and click Register

1.2 Note Your IDs

From the app registration Overview page, copy and save the following values – you will need them later:

  • Application (client) ID
  • Directory (tenant) ID

1.3 Create a Client Secret

  1. In the app registration, go to Certificates & secrets
  2. Click New client secret
  3. Enter a description and select an expiry period
  4. Click Add
  5. Copy the Value immediately – it will not be shown again

1.4 Add Dataverse API Permission

  1. Go to API permissions
  2. Click Add a permission
  3. Select Dynamics CRM
  4. Select Delegated permissions
  5. Check user_impersonation
  6. Click Add permissions
  7. Click Grant admin consent and confirm

Step 2 – Create the Custom Connector

2.1 Open Custom Connectors

  1. Sign in to https://make.powerautomate.com
  2. Select your target environment from the top-right environment picker
  3. In the left navigation, go to More > Discover all > Custom connectors
  4. Click New custom connector
  5. Select Import an OpenAPI file

2.2 Import the YAML File

  1. Enter a name for the connector: North52 Execute Formula
  2. Click the file browse button and select the North52-Execute-Formula.swagger.json (click to download) file provided to you
  3. Click Continue

Step 3 – Upload the North52 Logo

Adding the logo makes the connector easy to identify when building flows and Copilot agents.

3.1 Upload the Logo on the General Tab

  1. On the General tab, locate the connector icon area in the top left of the form (it will show a placeholder icon)
  2. Click the icon area
  3. Click Upload image
  4. Select the North52Logo128x128.png (click to download) file you downloaded
  5. The icon will update to show the North52 logo
  6. Enter #ffffff in the Icon background color field

Step 4 – Update the Host URL

The YAML file contains a placeholder host URL that must be updated to match your organisation's Dataverse environment.

4.1 Update the Host on the General Tab

  1. Still on the General tab, locate the Host field
  2. Replace the existing value with your organisation's Dataverse Web API host, for example: yourorg.crm.dynamics.com
  3. Note: Do not include https:// – the host field is the domain only
  4. To find your host URL, go to your Dynamics 365 environment > Settings > Customizations > Developer Resources and copy the Web API root URL domain

Step 5 – Configure OAuth Security

5.1 Enter Your Credentials

  1. Click the Security tab
  2. Confirm Authentication type is set to OAuth 2.0
  3. Fill in the following fields using the values saved in Step 1:
FieldValue
Identity ProviderAzure Active Directory
Client IDYour Application (client) ID from Step 1.2
Client SecretYour client secret value from Step 1.3
Tenant IDYour Directory (tenant) ID from Step 1.2
Resource URLhttps://yourorg.crm.dynamics.com (your full Dataverse environment URL including https://)

5.2 Save the Connector and Copy the Redirect URL

  1. Click Create connector in the top right
  2. After saving, the Redirect URL field will display a value, for example: https://global.consent.azure-apim.net/redirect
  3. Copy this value

5.3 Add the Redirect URL to Your App Registration

  1. Return to your app registration in the Azure portal
  2. Go to Authentication
  3. Click Add a platform > Web
  4. Paste the Redirect URL copied from the connector
  5. Click Configure then Save

Step 6 – Test the Connector

6.1 Create a Connection

  1. In the connector editor, click the Test tab
  2. Click New connection
  3. Sign in with a Dynamics 365 user account that has access to North52 formulas
  4. Accept the permissions prompt

6.2 Run a Test

  1. Under Operations, select Execute Formula
  2. In the $filter field enter a value using the following format:
north52_name eq 'YOUR_SHORTCODE' and north52_parameters eq '<entitylogicalname></entitylogicalname>' and north52_targetentityid eq '' and north52_formulatype eq '99'

Replace YOUR_SHORTCODE with a valid North52 formula short code and entitylogicalname with the entity the formula is registered on (e.g. account, contact).

  1. Click Test operation
  2. A successful response returns a 200 status and a JSON body containing north52_result

Step 7 – Use the Connector in a Flow or Copilot Agent

7.1 Adding to a Flow

  1. In Power Automate, open or create a flow
  2. Click Add an action
  3. Search for North52 Execute Formula
  4. Select the Execute Formula action
  5. If prompted, select the connection created in Step 6.1
  6. Build the $filter value dynamically using expressions and dynamic content from earlier steps in your flow

7.2 Reading the Result

To read the formula result in a subsequent flow step, use the following expression:

body('Execute_Formula')?['value'][0]['north52_result']

The north52_result field may return a JSON string depending on the formula type. Use a Parse JSON step if you need to access individual properties within the result.

7.3 Building the $filter Dynamically

Use the Power Automate concat expression to build the filter string from dynamic values. For example, to run a formula against the triggering account record:

concat(
  'north52_name eq ''YOUR_SHORTCODE'' and ',
  'north52_parameters eq ''<account></account>'' and ',
  'north52_targetentityid eq ''', triggerBody()?['accountid'], ''' and ',
  'north52_formulatype eq ''99'''
)

Troubleshooting

Empty results – value array is empty

The formula was not found or did not execute. Check the following:

  • The short code in north52_name is correct and the formula is active in North52
  • The north52_parameters XML wrapper uses the correct entity logical name
  • north52_formulatype is set to 99
  • The connecting user has access to North52 formulas in Dynamics 365

401 Unauthorised

Authentication has failed. Check the following:

  • The Client ID, Client Secret and Tenant ID in the connector Security tab are correct
  • The Resource URL matches your Dataverse environment URL exactly including https://
  • Admin consent has been granted for the user_impersonation permission
  • The Redirect URL in the Azure app registration matches the one shown in the connector
  • The client secret has not expired

400 Bad Request

The OData filter syntax is invalid. Check the following:

  • All four filter conditions are present: north52_name, north52_parameters, north52_targetentityid, north52_formulatype
  • String values are wrapped in single quotes
  • The XML in north52_parameters is well-formed and uses the correct entity logical name

Client Secret Expiry

Client secrets expire based on the period selected during creation (maximum 24 months). When a secret expires the connector will return 401 errors. To resolve:

  1. Generate a new client secret in the Azure app registration
  2. Edit the connector Security tab and replace the old secret value
  3. Click Update connector

Set a calendar reminder before the expiry date to rotate the secret proactively.