Microsoft OAuth Error Code : AADSTS650052

Vinay Pugal 36 Reputation points
2022-12-29T15:32:55.903+00:00

When we request consent for our application , users are facing this error :

AADSTS650052: The app is trying to access a service 'd42ffc93-c136-491d-b4fd-6f18168c68fd'(Microsoft Advertising API Service) that your organization 'xxxxx' 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.

The following scopes are requested from the user : "https://ads.microsoft.com/msads.manage", "offline_access"

We have also added the following permissions in the Api permissions:
274867-screenshot-20221229-210005.png

How can we fix this?

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.
{count} votes

1 answer

Sort by: Most helpful
  1. Manoj 0 Reputation points
    2025-11-19T13:50:01.62+00:00

    Hello All,

    The 650052 error code can be returned with message "The app needs access to a service ("https://ads.microsoft.com") that your organization "{organization}" has not subscribed to or enabled."

    If you observe this error, please ensure that you have at least one of the admin users from your Azure AAD tenant added and enabled for work accounts in the Microsoft Advertising web application. Please contact support for further assistance.

    Also, kindly refer to the Application behavior explained here for more insights: https://learn.microsoft.com/en-us/advertising/guides/authentication-oauth-register?view=bingads-13#application-behavior

    I hope this will help resolving your issues.

    Regards,

    Manoj

    0 comments No comments

Your answer

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