AADSTS650052 Error When Connecting to Dynamics 365 Business Central

AADSTS650052 Error When Connecting to Dynamics 365 Business Central

When connecting to Microsoft Dynamics 365 Business Central, the following error may occur:
"AADSTS650052: The app is trying to access a service '00000015-0000-0000-c000-000000000000'(Microsoft Dynamics ERP) that your organization '***' lacks a service principal for. Contact your IT Admin to review the configuration of your service subscriptions or consent to the application in order to create the required service principal. Trace ID: *** Correlation ID: *** Timestamp: *** "

This error indicates that Azure AD cannot find the required service principal for the Microsoft Dynamics ERP resource in your tenant. The issue occurs on the Microsoft Azure AD / Business Central side during the OAuth consent process and is not specific to Skyvia.

This error typically appears when:
  1. The required service principal for Microsoft Dynamics ERP is not created in Azure AD
  2. Admin consent was not completed during the OAuth flow
  3. Azure AD does not automatically generate the service principal in the tenant
Recommended Solution:
1. Recreate the connection
  1. Go to Skyvia and recreate the connection
  2. Click Sign in with Microsoft
  3. Sign in using a Global Administrator / Tenant Administrator account
  4. Approve the consent request on behalf of your organization if prompted
2. Check admin consent behavior - if no consent prompt appears:
  1. Ensure your account has permission to grant admin consent
  2. Verify that tenant policies do not block application consent
More details about the connector can be found here: Dynamics 365 Business Central
Similar AADSTS650052 errors may be described in Microsoft documentation under different resource names, however in this case the relevant resource is Microsoft Dynamics ERP.

Advanced workaround (if consent prompt does not appear):
In some Azure environments, the service principal must be created manually before the consent flow can complete. A confirmed workaround is to create the service principal using Microsoft Graph PowerShell by referencing the App ID (not name):
Microsoft Dynamics ERP App ID: 00000015-0000-0000-c000-000000000000
After creating the service principal, retry the connection and the consent window should appear correctly.

Alternative authentication method:
If OAuth authentication cannot be completed, you may use Basic Authentication in Skyvia, provided that:
  1. Microsoft Dynamics 365 Business Central API access is enabled
  2. Web Server Access Key is available


    • Related Articles

    • Dynamics 365: Principal user is missing prvReadAccount privilege

      The error message Principal user is missing prvReadAccount privilege is returned by the Dynamics 365 API. The main cause of this error is that the owner is assigned a security role other than System Administrator and lacks the necessary read-write ...
    • Google Sheets: Internal error encountered. Error code: 500

      The error "Internal error encountered. Error code: 500" is returned by the Google Sheets API and is typically caused by processing a large volume of data. To resolve this issue, we recommend adjusting the Batch Size value in your integration. For ...
    • Zoho CRM: An error occurred during login operation. Error: invalid_code

      If you encounter the login error An error occurred during login operation. Error: invalid_code while connecting to Zoho CRM, it means the wrong Domain is selected in your Zoho CRM connection. To resolve the issue, open your connection settings, ...
    • ❗Issue connecting to Looker Studio

      If you are experiencing issues with connecting to Looker Studio or finding Skyvia in the list of available connectors, please note that our team is aware of this issue and is actively working on a resolution. In the meantime, you can access the ...
    • Zoho CRM: Integration failed: inactive user cannot access the API error

      This error message is returned by the Zoho CRM API. Skyvia connects to data sources through their APIs and therefore is subject to its features and limitations. Unfortunately, there are no additional details, as this is all the information received ...