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