Skip to content

CTI Tray Application (OAuth)

Tray Application Changes

Starting from CTI Tray Application v5.0.6.0 older user configuration will no longer be usable. CTI v5.0.6.0 will have an OAuth integration, and no longer support SOAP Url but OData instead, therefore the server port for On Prem must be using the port which is provided in the OData link not the SOAP link. Business Central On Premise OAuth is available starting from CTI Tray Application v5.0.8.0.

Warning

As SaaS no longer providing Web Service Key the login for SaaS must be used with OAuth.

Setting up the App for OAuth

1. Setting the app in Azure Portal. (Mandatory for first time setup)

This step is required for the first time, to make the OAuth connection between the Tray Aplication and Business Central communicate with each other.

Steps :

Creating new app registrations

  1. Navigate to portal.azure.com.
  2. Login with an account.
  3. Go to App registrations.
  4. Click New registration.
  5. Write a Name for it.
  6. Choose the tenant type you need.
  7. Click on Register.
  8. In the overview page you will already see your Client ID and Tenant ID.

Creating Redirect URL

  1. Navigate to Authentication.
  2. Create Add a platform.
  3. Choose Mobile and desktop applications.
  4. Here you can choose the first option which is image.png.
  5. Click Configure.
  6. The URL will be used as the Redirect URL.

Creating API Permissions

  1. Navigate to API Permissions.
  2. Click add permissions.
  3. Choose Dynamics 365 Business Central.
  4. Choose Delegated permissions.
  5. Choose user_impersonation.
  6. Click Add Permissions in the bottom of the Request API permissions page.

Creating scope (only for On-Premise)

  1. Navigate to Expose an API.
  2. Click Add a scope.
  3. The Application ID URI will automatically be filled.
  4. Click Save and Continue.
  5. Click Add a scope again.
  6. Enter user_impersonation as scope name (important).
  7. Choose Admin and users for consent.
  8. Enter Full access to web services API for Admin and User consent display name.
  9. Enter Grants full access to the Business Central web services APIs. These APIs provide the capability to call web services APIs and modify Business Central data. for Admin and User consent description.
  10. Set the State to Enabled.
  11. See picture below as reference. image.png
  12. Next go to API permissions.
  13. Click Add a permissions.
  14. Choose My API.
  15. Choose the one with your App Registration Name.
  16. Click on Delegated permissions.
  17. There you will see the user_impersonation permission that you made before.
  18. Tick on it, and click Add permissions.

Configuring CTI Tray (SaaS)

  1. Navigate to Webservice Tab.
  2. Change the Service Method to Webservice SaaS.
  3. Enter the Tenant ID, Client ID, and Redirect URL from the information that we get before.
  4. To get the Server OData Value, open Business Central and from the search bar, search Webservice.
  5. Here you will see the OData V4 URL.
  6. This will be the value of the Server OData, in this case it is api.businesscentral.dynamics.com image.png
  7. For the Environment, you can look at the URL in your browser. It will be written before your company, in this case it is Sandbox.image.png
  8. When all the fields are fullfilled, you can click on the sign in button, and a pop-up window will be open to sign in to your microsoft account.
  9. After signing in, go to the Webclient tab and paste the settings, and also insert the Server.
  10. Close the Tray Settings and the Tray will be automatically connected if all of the settings are correct.

Configuring CTI Tray (OnPrem)

  1. Navigate to Webservice Tab.
  2. Change the Service Method to Webservice OAuth.
  3. Enter the Tenant ID, Client ID, and Redirect URL from the information that we get before.
  4. To get the Server OData Value, open Business Central and from the search bar, search Webservice.
  5. Here you will see the OData V4 URL.
  6. This will be the value of the Server OData, in this case it is bc-test.simova.de image.png
  7. For the Port, you can look at it behind the server OData URL, in this case it is 7048.image.png
  8. When all the fields are fullfilled, you can click on the sign in button, and a pop-up window will be open to sign in to your microsoft account.
  9. After signing in, go to the Webclient tab and paste the settings.
  10. Close the Tray Settings and the Tray will be automatically connected if all of the settings are correct.

Authentication outside of the company domain

If your company is located outside your domain, please add the appropriate domain to your username specification. Please use the following format: domain\username (e.g. AD\test). The domain specified should be that of your company.

Changing Account

  1. To change account, navigate to the Webservice tab.
  2. Click on the sign out button.
  3. If changes are required, repeat steps in Configuring CTI Tray (SaaS) or (OnPrem).
  4. The sign in button should be shown again and you can sign in to another account.