Skip to end of banner
Go to start of banner

WIP: Application Configuration in Azure Portal for OAuth2 Account to use in Business Central

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

In this Article

Overview

Snaps in the Microsoft Business Central Snap Pack require an Access Token or OAuth2 account to access the resources in Azure. For the accounts to authorize successfully, ensure to create and configure an application corresponding to the account as displayed in the workflow.

Steps one to three are done in the Azure Portal and the remaining steps are done in the Snap account (SnapLogic Platform).

Prerequisites

An Azure account with a free subscription to create the application.

Key Steps in the Workflow

Create an Application in the Azure Portal

  1. Log in to the Microsoft Azure Portal.

  2. Navigate to Azure services > Azure Active Directory.

  3. Navigate to Add > App registration.

  4. On the Register an application page, specify the name for registering the application and click Register. Learn more about creating an application at https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app.

To use an existing application, navigate to Portal Home > Azure Active Directory >App registrations > All applications. In the search box, specify the application name you want to use. The details of the registered application dsiplay in the search list.

Define Permissions

The Microsoft Business Central Snap Pack supports the following two types of accounts:

The permissions for the registered application are either Delegated or Application permissions based on the account types.

  1. On the left navigation panel, navigate to Manage, and select API permissions > Add a permission.

2. On the Request API permissions window, select Microsoft Graph > Business Central for the OAuth2 and Access Token Account.

3. Select Delegated Permissions or Application Permissions.

4. Select the permissions from Files, Users, and Teams.

5. Click Add Permissions. View all the permissions added under Configured permissions.

6. Click Overview and select Add a Redirect URI. You will be redirected to the Platform configurations page.

a. Under Platform configurations, click Add a platform.

b. Select Web and specify a valid Redirect URI https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/businesscentral and click Configure. A popup message displays indicating that the application is successfully updated.

Configure Business Central Application, for the instance URL

  1. Log in to the Microsoft Business Central application.

  2. Navigate to System administration > Setup > Azure Active Directory applications and Select New.

  3. Configure the fields for the new record:

    1. In the Client ID field, specify the application ID you registered in the Azure Active Directory.

    2. In the Name field, specify a name for the application.

    3. In the User ID field, select an appropriate service account user ID.

    4. Select Save to apply the changes.

Locate/Define the Information Required to Create your Business Central OAuth2 Account

Specify the values required to create a successful Business Central OAuth2 account.

  1. Navigate to the Business Central Snap of your choice and configure the Business Central OAuth2 Account with the following details:

  2. Configure the OAuth2 account with the details from the registered application in the Business Central Portal.

3. Click Authorize. The Access and Refresh tokens are generated. You are redirected to the sign-in page of the Azure Portal.

4. Sign in to Azure Portal with valid credentials to redirect to the Snap Edit account settings dialog. The Access and Refresh tokens are auto-populated and encrypted in the Account settings.

5. Validate the Snap Account.

Troubleshooting

Error

Reason

Resolution

Error 401

The pipeline could not complete execution because of a connection error.

Reauthorize the account and retry.

Related Content

  • No labels