2

I'm sending the user to https://login.microsoftonline.com/common/oauth2/v2.0/authorize?scope=https://ads.microsoft.com/ads.manage%20offline_access&client_id=myappid&response_type=code&redirect_uri=https://asdlkfjalsdjkf.com/callback

and after they consent Microsoft redirects to my callback url with the following error:

error: invalid_client
error_description: AADSTS650052: The app needs access to a service (\"https://ads.microsoft.com\") that your organization \"XYZ org\" has not subscribed to or enabled. Contact your IT Admin to review the configuration of your service subscriptions.
Trace ID: xxxxxxxxx
Correlation ID: xxxxxxxxx
Timestamp: 2019-12-03 22:39:00Z
error_uri: https://login.microsoftonline.com/error?code=650052

Any help would be really appreciated.

I'm using the Bing ads sdk and I'm following this example

Chris
  • 4,643
  • 6
  • 31
  • 49
  • 1
    Did you use the Microsoft Advertising user account to consent? Reference: https://learn.microsoft.com/en-us/advertising/guides/get-started?view=bingads-13 – Tony Ju Dec 04 '19 at 02:33
  • WOW! I can't believe I didn't know this or even try this. Post it as an answer and i'll accept it. Thanks. – Chris Dec 04 '19 at 16:41

1 Answers1

0

You need to use the Microsoft Advertising user account to consent. Refer to this guide for more details.

Tony Ju
  • 14,891
  • 3
  • 17
  • 31