遵循本指南:
https://learn.microsoft.com/en-us/advertising/guides/get-started?view=bingads-13
我有一个正在运行的 PowerShell 脚本,它成功引导我在浏览器中完成完整的 MS 帐户登录。这最终会出现在指南中描述的 URL 中,其中包含参数code。我将其粘贴回 PowerShell,并收到以下错误:
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
Run Code Online (Sandbox Code Playgroud)
这究竟意味着什么?如何使用消费者端点来满足此请求?我只是想在一台机器、一个帐户上运行一个 python 脚本——消费者端点是我想要的吗?
小智 5
由于@BobRz 确认了这一点,我将重新发布作为答案:
在应用程序注册期间,请务必启用对所有帐户类型的支持,例如,请参阅此处的步骤 3:https: //learn.microsoft.com/en-us/advertising/guides/authentication-oauth-identity-platform ?view=bingads- 13#注册应用程序