AADSTS650052: The app is trying to access a service (Microsoft Advertising API Service) that your organization lacks a service principal for.

Joaquin Torres 0 Reputation points
2025-03-19T15:13:04.0033333+00:00

We have set up a multi-tenant application following the documentation. When we request consent from a user in another organization using the https://login.microsoftonline.com/common/oauth2/v2.0/authorize endpoint with the https://ads.microsoft.com/msads.manage scope, the user encounters the following error:

AADSTS650052: The app is trying to access a service 'd42ffc93-c136-491d-b4fd-6f18168c68fd'(Microsoft Advertising API Service) that your organization 'XXXXXX' lacks a service principal for.

When testing if I go through the OAuth flow with a user from our tenant, it works. Since the organization 'XXXXX' in the error message is not our tenant, could this be an issue with the user’s setup?

Or is there a setting in our app that needs to be configured that I might be missing? Any suggestions are welcome.

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
464 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.