Fix AADSTS650052 Error - Dynamics 365 Business Central in Skyvia

AADSTS650052 Error When Connecting to Dynamics 365 Business Central

Overview

When connecting to Microsoft Dynamics 365 Business Central in Skyvia, you may encounter the following error:

Quote
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.

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.

Root Causes

This error typically appears when:

  • The required service principal for Microsoft Dynamics ERP is not created in Azure AD.
  • Admin consent was not completed during the OAuth flow.
  • Azure AD does not automatically generate the service principal in the tenant.

Resolution

Step 1: Recreate the connection using a Global Administrator account

  1. Go to SkyviaConnections and recreate the Dynamics 365 Business Central connection.
  2. Click Sign in with Microsoft.
  3. Sign in using a Global Administrator or Tenant Administrator account.
  4. If prompted, approve the consent request on behalf of your organization.

Step 2: Check admin consent behavior

If no consent prompt appears:

  • Ensure your account has permission to grant admin consent.
  • Verify that tenant policies do not block application consent.

Step 3: 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:

Microsoft Dynamics ERP App ID: 00000015-0000-0000-c000-000000000000

After creating the service principal, retry the connection — the consent window should appear correctly.

Alternative: Use Basic Authentication

If OAuth authentication cannot be completed, you may use Basic Authentication in Skyvia, provided that:

  • Microsoft Dynamics 365 Business Central API access is enabled.
  • A Web Server Access Key is available.

Useful Links

    • Related Articles

    • Dynamics 365: Principal user is missing prvReadAccount privilege

      Overview The error Principal user is missing prvReadAccount privilege is returned by the Dynamics 365 API. It indicates that the user account used for the Skyvia connection lacks the required read-write privileges for one or more entities. Root ...
    • Google Sheets: Internal error encountered. Error code: 500

      Overview 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 in a single request. Resolution To resolve this issue, reduce the Batch Size value in ...
    • Zoho CRM: invalid_code Login Error

      Overview If you encounter the error "An error occurred during login operation. Error: invalid_code" while connecting to Zoho CRM in Skyvia, it means the wrong Domain is selected in your Zoho CRM connection settings. Resolution Open your Zoho CRM ...
    • Issue Connecting to Looker Studio

      Overview If you are experiencing issues connecting to Looker Studio or cannot find Skyvia in the list of available connectors, you can access the Skyvia Looker Studio connector directly using the link below. Resolution Use the following direct link ...
    • QuickBooks Online: The name supplied already exists error

      Overview The error "The name supplied already exists. Another customer, vendor, or employee is already using this name" is a limitation returned directly from QuickBooks. It occurs when the Display Name you are trying to create already exists in ...