Business Central OAuth2 Account

In this article

Overview

You can use this account type to connect all Snaps in this Snap Pack with the Business Central application that requires OAuth2 authorization.

Prerequisites

A registered application in the Microsoft Azure Portal with required permissions to generate the Access token. Learn more about registering an application in the Azure Portal for OAuth2 Account.

Limitations and Known Issues

None.

Account Settings

Business Central OAuth2 Account settings.png
  • Asterisk (*): Indicates a mandatory field.

  • Suggestion icon ( ): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon ( ): Indicates the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon ( ): Indicates that you can add fields in the field set.

  • Remove icon ( ): Indicates that you can remove fields from the field set.

Field Name

Field Type

Description

Field Name

Field Type

Description

Label*

Default Value: N/A
Example: Business Central

String

Specify a unique name for the account.

Instance URL*

Default Value: N/A
Example: https://1b4bgn.trial.operations.dynamics.com

String

Specify the host URL of the Business Central application in the following format:

https://api.businesscentral.dynamics.com/v2.0/<environment name>/api/v2.0

The instance URL in the Business Central application refers to the web address you can use to access your specific instance of Business Central. The URL typically consists of the domain name or IP address of the server hosting the Business Central instance, followed by the specific path or endpoint that leads to the application. The exact format of the instance URL depends on the deployment method and configuration of your Business Central Environment.

Client ID*

 

Default Value: N/A
Example: 456efd-5464g-jdhnd-55dg

String

Specify the client ID associated with your OAuth2 application. You can create the client ID as advised by your application provider. Learn more about generating a Client ID: Application Configuration in Azure Portal for OAuth2 Account to use in Business Central

Client secret

 

Default Value: N/A
Example:<Encrypted>

String

Specify the client secret associated with your account. You can create the client secret as advised by your application provider. Learn more about generating a Client secret: Application Configuration in the Azure Portal for OAuth2 Account to use Business Central OAuth2 Account.

Access token

 

Default Value: N/A
Example: <Encrypted>

String

Auto-generated after authorization. 
Use the access token associated with the OAuth2 application to make API requests for the user associated with the client ID.

Access token expiration

Default Value: N/A
Example: 1664538038

Integer

Auto-generated after authorization. The access token expiration value. 

OAuth2 Endpoint*

Default Value: https://login.microsoftonline.com/<tenant-id>oauth2/v2.0/authorize
Example: https://login.microsoftonline.com/413e210c-7e55-4f7b-847d-e3d423815beb/oauth2/v2.0/token

String

Specify the authorization endpoint to obtain the access token. Replace the tenant ID placeholder with the tenant ID generated when creating the OAuth2 application.

OAuth2 Token*

Default Value: https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token
Example: https://login.microsoftonline.com/413e110c-7d55-4f7b-947d-e3d423916beb/oauth2/v2.0/token

String

Specify the token endpoint to obtain the access token. Replace the tenant ID placeholder with the tenant ID generated during OAuth2 account creation.

Grant type

 

Default Value: authorization_code
Example: client_credentials

String

Select one of the following grant types for authentication:

  • authorization_code: Authenticates using credentials (username and password), which return to the client through a redirect URL. The application then receives the authorization code from the URL and uses it to request an access token.

  • client_credentials: Obtains an access token for the client ID and client secret through the token endpoint URL.

Token endpoint config

Use this field set to define custom properties for the OAuth2 token endpoint. This endpoint returns access tokens or refresh tokens based on the request parameters.

Token endpoint parameter

Default Value: N/A
Example: Scope

String

Specify the name for the token endpoint parameter.

Token endpoint parameter value

Default Value: N/A
Example: https://api.businesscentral.dynamics.com/.default offline_access

String

Specify the value for the parameter.

Auth endpoint config

Use this field set to define custom properties for the OAuth2 authentication endpoint.

 

Authentication parameter

Default Value: N/A
Example: Scope, redirect_uri

String

Specify the authentication parameter .

Authentication parameter Value

Default Value: N/A
Example: https://elastic.snaplogic.com/sl/login.html

String

Specify the associated value for the authentication parameter.

Troubleshooting

Error

Reason

Resolution

Error

Reason

Resolution

Authentication failed.

You entered an incorrect Client ID or Client secret.

Ensure that you have provided valid Client ID and Client secret values for the account and allowed the required access privileges to the application. Reauthorize the account and retry.

Snap Pack History


Related Links