2

Following this guide:

https://learn.microsoft.com/en-us/advertising/guides/get-started?view=bingads-13

I've got a running PowerShell script which successfully takes me through a full MS account login in-browser. This winds up at a URL as described in the guide, which includes the code param. I paste this back into PowerShell, and receive the following error:

Invoke-WebRequest : {"error":"invalid_request","error_description":"AADSTS9002331: Application
'xxxxxxxxxxx'(AppName) is configured for use by Microsoft Account users only. Please use
the /consumers endpoint to serve this request.\r\nTrace ID: 16da02c8-d855-44cf-8693-614a74aa0800\r\nCorrelation ID:
63ba5d25-1210-407d-9eec-ef3b5d41c272\r\nTimestamp: 2020-06-10
19:25:17Z","error_codes":[9002331],"timestamp":"2020-06-10

What does this even mean? How do I use the consumers endpoint to serve this request? I'm just trying to run a python script on a single machine, single account -- is the consumers endpoint what I want?

BobRz
  • 470
  • 5
  • 11
  • 2
    During app registration did you enable support for all account types e.g., see step 3 here: https://learn.microsoft.com/en-us/advertising/guides/authentication-oauth-identity-platform?view=bingads-13#registerapplication Otherwise please clarify your app registration steps / repro. – Eric Urban Jun 10 '20 at 22:55
  • @EricUrban No, I did not do that. Thanks for catching my mistake! Care to post it as an answer so I can give you credit? – BobRz Jun 11 '20 at 02:49

1 Answers1

5

Since this was confirmed by @BobRz I'm re-posting as an answer:

During app registration please be sure to enable support for all account types e.g., see step 3 here: https://learn.microsoft.com/en-us/advertising/guides/authentication-oauth-identity-platform?view=bingads-13#registerapplication

Eric Urban
  • 582
  • 2
  • 7