Error: AADSTS650052 Service Principal Missing for Microsoft Advertising API Service
Issue
While creating a connection, the following error appears:
AADSTS650052: The app is trying to access a service (Microsoft Advertising API Service) that your organization lacks a service principal for. Contact your IT Admin to review the configuration of service subscriptions or consent to the application in order to create the required service principal.
Environment
Connector: Microsoft Advertising
Resolution
To resolve this issue, follow these steps:
Sign in to the Azure Portal with an account that has Global Administrator or Cloud App Administrator permissions.
Navigate to Microsoft Entra ID > Enterprise applications.
In the search box, look for Microsoft Advertising API Service or Microsoft Advertising. Select the application if found.
In the application's left menu, select Permissions. In some interfaces, this option is under Security > Permissions.
Click Grant admin consent or Grant tenant-wide admin consent, and confirm. If prompted, check the requested scopes and click Grant. Azure will automatically create the necessary service principal.
In Fivetran, re-authorize your Microsoft Advertising connection.
i. Go to your Microsoft Advertising connection page.
ii. Select the Settings tab.
iii. Click Edit connection.
iv. Click Re-Authorize Connection.
v. Click Save & Test.
Cause
This issue occurs when your Microsoft Entra ID tenant does not have the required Microsoft Advertising service principal. Granting admin consent creates the service principal and resolves the issue.