Problem:
How to set up oauth authentication for on-prem multitenant solution web services?
I tried the example from microsoft documentation -> Using OAuth to Authorize Business Central Web Services. It did not work with Visual Studio 2017 and 2019 and it is not describing how to do it for the multitenant environment.
We have different environment already set up and the web client is working fine with AccessControl credential type. We use one service instance for multiple tenants not service instance per tenant.
I did register my console app as described in the documentation (although the documentation looks already old, because the steps are not exactly the same in the Azure Portal anymore).
I did manage to get the bearer token using Postman, but I am not able to call standard Chart of Accounts OdataV4 rest web service.
I receive an error message:
DX10231: Audience validation failed. Delegate returned false, securitytoken: '[PII is hidden]'
I have a feeling, that the issue is related to console app registration and permissions delegation to the business central server app registered in Azure.
Has somebody done something like this?