Skip to main content

Hi All,

I am trying to connect a Business Central - Online Datasource and I completed all the Prerequisites as per the Training Documents, but when I am testing the connection on the Portal, it’s not giving me success and following is the error. Need your help

Error opening connection to BC Cloud: System.ApplicationException: User must authenticate connection. at Jet.NavMetadataPlugin.ApiHelper.GetAccessToken(String filePath) at Jet.NavMetadataPlugin.ApiHelper.GenerateRequest(String url, String method) at Jet.NavMetadataPlugin.ApiHelper.<>c__DisplayClass29_0.<ApiGetResponse>b__0() at Jet.NavMetadataPlugin.ApiHelper.HandleThrottling(Func`1 action) at Jet.NavMetadataPlugin.ApiHelper.ApiGetResponse(Boolean needCompany, String apiName, Boolean& timedOut, String basUrl) at Jet.NavMetadataPlugin.BCCloudMetadata.GetTableViaStandardAPI(Boolean needCompany, String api) at Jet.NavMetadataPlugin.BCCloudMetadata.Initialize() at Jet.NavMetadataPlugin.BCCloudMetadataPlugin.Open(Boolean enableLogging, String logFilePath)

Hi @pkaustubha 

Have you done this as well?

With the message mentioning that you need to authenticate the connection, the part from the above guide seems like the first thing to try.


Hi Thomas, I tried all, but still unable to connect and test the connection successfully.


Was the OAuth authentication a success?

Do you have a file in the folder that is not empty?


OAuth Authentication is not successful. I have a file in folder with some data in it


Hi @pkaustubha 

I will add a short summary of what we changed to get this to work.

There was an issue with the API URL. This one https://api.businesscentral.dynamics.com/v2.0/{tenantID}, where the tenant id had incorrect characters added. 

Besides this we tried to use Service to Service authentication, but it gave an error about a lack of access. 

Then we changed it to OAuth again and redid the authentication of this. After doing this we got access to the source.


Hi @pkaustubha 

Have you ensured that the API URL is correct?

Did you specify a OAuth setting file path? Can you please make sure that the user running the ODX service has access to this file?

Have you ensured that all the prerequisites outlined below are in place? 

 

https://support.timextender.com/data%2Dsources%2D112/prerequisites%2Dto%2Dconnecting%2Dto%2Ddynamics%2Dbusiness%2Dcentral%2D365%2Donline%2Ddata%2Dsources%2D1431

The prerequisites include:

  • Granting D365 AUTOMATION or SUPER permission in BC under User permission sets
  • Setting up Jet Analytics extension in BC and configuring the extension to allow for HTTP client requests
  • Setting up an Azure app registration and adding BC application permissions to this app registration
  • Giving the Azure app registration “D365 AUTOMATION” User Permission Set in BC

Hi @pkaustubha is the issue resolved? Please let us know if you have an update on the above questions


Reply