我在this documentation的第3步中使用/adminconsent
端点时收到此回复。我已经使用v2.0 endpoint注册了该应用程序,因此我不确定为什么它认为这是v1.0。此外,我用于登录的帐户是一个工作帐户(不是像错误所示的微软帐户)。
{
error: 'access_denied',
error_description: 'AADSTS50020: We are unable to issue tokens from this api version for a Microsoft account. Please contact the application vendor as they need to use version 2.0 of the protocol to support this.\r\nTrace ID: 11eec023-c150-42f2-a9e6-13b52db30b00\r\nCorrelation ID: 00b57bc3-9e86-47c2-907b-579357344266\r\nTimestamp: 2018-01-10 19:26:00Z',
admin_consent: 'True',
tenant: *Redacted*,
state: *Redacted*
}
这就是我构建/adminconsent
端点的方式。好像我必须做一些明显的事情?
const msUrl = `https://login.microsoftonline.com/common/adminconsent?client_id=${clientId}&state=${state}&redirect_uri=${encodeURIComponent(callbackUrl)}`;