OAuth and Business Central in SaaS
In this article
Business Central in SaaS only supports OAuth (no basic auth). This article shows step-by-step how to configure Windows Services for Business Central in SaaS, and how to test the connections to Web Services in SaaS.
To use OAuth in SaaS you need to obtain the values for:
- Tenant
- Client ID
- Client Secret - these three are used to get the Access Token that is then used to call Business Central web services.
- Environment
- Company
- URL - the URL, Company, and Environment values are then used to create the full URL to the correct BC instance using the access token.
1 Tenant ID
You find the tenant in the URL or by opening Help & Support.
https://lscentral.api.bc.dynamics.com/v2.0/952553e1-1d21-4b15-9223-074be4c8cc5b/Production/ODataV4/
https://lscentral.bc.dynamics.com/952553e1-1d21-4b15-9223-074be4c8cc5b
2 Client ID
-
Open the Azure portal and select Azure Active Directory.
-
Select the “App Registrations” and select the application (LSCentralQA).
-
The client ID is on the Overview page.
3 Client Secret
- Open https://portal.azure.com/ and select the application (see 2 Client ID).
- Select Certification & secrets.
Note: The value is the client Secret needed to get the access token and cannot be viewed. Therefore, make sure to save the secret in a secure place when it has been created.
If you do not have the value, you can always create a new one here:
4 Environment
You can find this value in the URL or in Help & Support (see 1 Tenant ID).
https://lscentral.bc.dynamics.com/952553e1-1d21-4b15-9223-074be4c8cc5b/QA20_0
Open Admin Center from the Settings page to see available environments:
5 Company
Open My Settings to see the company name.
6 URL
The base URL for the LS Central web API is https://lscentral.api.bc.dynamics.com/v2.0
When calling the web methods, the full URL looks like this:
https://lscentral.api.bc.dynamics.com/v2.0/952553e1-1d21-4b15-9223-074be4c8cc5b/QA20_0/ODataV4/HotelWSOData_Ping?company=Cronus QA20
To set up in Business Central, open Azure Active Directory, and create a user for this application/clienID. https://yzhums.com/20690/
See also
OAuth and Business Central On-premises