我尝试使用Microsoft OAuth 2.0验证我的应用程序。申请注册已经完成。
我使用网络浏览器组件让用户允许应用访问用户的日历。然后,我会跟踪重定向网址以提取授权代码。 但是该服务将应用程序重定向到错误页面。
网址:(我的应用程序将用户导航到包含身份验证信息的第一个网址)
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?response_mode=form_post&prompt=login&client_id=c36b4fd4-8b5a-4831-b146-6e4cdac90d0e&scope=https:%2F%2Fgraph.microsoft.com%2Fcalendars.readwrite &response_type=code&redirect_uri=urn:ietf:wg:oauth:2.0:oob
about:blank
https://login.live.com/Me.srf?wa=wsignin1.0&idpflag=direct&wreply=https:%2F%2Flogin.microsoftonline.com
https://login.live.com/oauth20_authorize.srf?response_mode=form_post&prompt=login&client_id=c36b4fd4-8b5a-4831-b146-6e4cdac90d0e&scope=https:%2F%2Fgraph.microsoft.com%2Fcalendars.readwrite &response_type=code&redirect_uri=urn:ietf:wg:oauth:2.0:oob&login_hint=altostratous%40outlook.com&ui_locales=en-US&display=page&uaid=1ed5dd7edad547ea9ae42599ecf8028e&issuer=mso&msproxy=1
https://login.live.com/ppsecure/post.srf?response_mode=form_post&prompt=login&client_id=c36b4fd4-8b5a-4831-b146-6e4cdac90d0e&scope=https:%2F%2Fgraph.microsoft.com%2Fcalendars.readwrite &response_type=code&redirect_uri=urn:ietf:wg:oauth:2.0:oob&login_hint=altostratous%40outlook.com&ui_locales=en-US&display=page&issuer=mso&msproxy=1&contextid=04C5394112425BED&bk=1466075419&uaid=1ed5dd7edad547ea9ae42599ecf8028e&pid=15216
https://account.live.com/Consent/Update?ru=https://login.live.com/oauth20_authorize.srf%3flc%3d1033%26response_mode%3dform_post%26prompt%3dlogin%26client_id%3dc36b4fd4-8b5a-4831-b146-6e4cdac90d0e%26scope%3dhttps%253A%252F%252Fgraph.microsoft.com%252Fcalendars.readwrite%2520%26response_type%3dcode%26redirect_uri%3durn:ietf:wg:oauth:2.0:oob%26login_hint%3daltostratous%2540outlook.com%26ui_locales%3den-US%26display%3dpage%26issuer%3dmso%26msproxy%3d1%26uaid%3d1ed5dd7edad547ea9ae42599ecf8028e%26pid%3d15216%26mkt%3dEN-US%26scft%3dDevbhujhpkAjAfbj!ZXBlvEp*4p0KUzdBN3n1IHXrQQauBhA50taNhaXBRiw83xqwtX5hxg4gWMoeOwyjHM8Rh7ou9Ho!Zxun*eKSj3YFvrDeYTKWi5Ch!tAwgEuey7KPwCE22PPek0hBJ23YxeB!zqgG8pviIyWCDZED!86SBSE%26contextid%3d04C5394112425BED&mkt=EN-US&uiflavor=web&id=293577&client_id=000000004019AB47&rd=none&scope=calendars.readwrite&cscope=
https://c1.microsoft.com/c.gif?DI=4050&did=1&t=
https://account.live.com/Consent/Update?ru=https://login.live.com/oauth20_authorize.srf%3flc%3d1033%26response_mode%3dform_post%26prompt%3dlogin%26client_id%3dc36b4fd4-8b5a-4831-b146-6e4cdac90d0e%26scope%3dhttps%253A%252F%252Fgraph.microsoft.com%252Fcalendars.readwrite%2520%26response_type%3dcode%26redirect_uri%3durn:ietf:wg:oauth:2.0:oob%26login_hint%3daltostratous%2540outlook.com%26ui_locales%3den-US%26display%3dpage%26issuer%3dmso%26msproxy%3d1%26uaid%3d1ed5dd7edad547ea9ae42599ecf8028e%26pid%3d15216%26mkt%3dEN-US%26scft%3dDevbhujhpkAjAfbj!ZXBlvEp*4p0KUzdBN3n1IHXrQQauBhA50taNhaXBRiw83xqwtX5hxg4gWMoeOwyjHM8Rh7ou9Ho!Zxun*eKSj3YFvrDeYTKWi5Ch!tAwgEuey7KPwCE22PPek0hBJ23YxeB!zqgG8pviIyWCDZED!86SBSE%26contextid%3d04C5394112425BED&mkt=EN-US&uiflavor=web&id=293577&client_id=000000004019AB47&rd=none&scope=calendars.readwrite&cscope=
https://login.live.com/ppsecure/post.srf?lc=1033&response_mode=form_post&prompt=login&client_id=c36b4fd4-8b5a-4831-b146-6e4cdac90d0e&scope=https:%2f%2fgraph.microsoft.com%2fcalendars.readwrite+&response_type=code&redirect_uri=urn:ietf:wg:oauth:2.0:oob&login_hint=altostratous%40outlook.com&ui_locales=en-US&display=page&issuer=mso&msproxy=1&mkt=EN-US&scft=DevbhujhpkAjAfbj!ZXBlvEp*4p0KUzdBN3n1IHXrQQauBhA50taNhaXBRiw83xqwtX5hxg4gWMoeOwyjHM8Rh7ou9Ho!Zxun*eKSj3YFvrDeYTKWi5Ch!tAwgEuey7KPwCE22PPek0hBJ23YxeB!zqgG8pviIyWCDZED!86SBSE&contextid=04C5394112425BED&bk=1466075521&uaid=1ed5dd7edad547ea9ae42599ecf8028e&pid=15216&fsui=1
页面:
然后要求用户允许该应用程序。
最后,当用户接受时会显示此错误页面。