我们有一个网站(建立在PHP框架上),我们为教师/学生提供在线教育工具.我们已经与google.com进行了OAuth集成,用户可以使用他们的Google帐户"注册"和"登录"我们的网站(可以是个人Gmail帐户,也可以是Google Apps域的成员).
我们正在尝试与O365进行类似的集成,我们的网站可以向O365询问用户的电子邮件和姓/名,以便我们可以在我们的网站上为他们创建帐户,并在创建帐户后将其登录.我们创建了Azure中的应用程序列表 - > Active Directory,并生成了客户端ID和机密,并将它们插入到PHP代码中.此处描述的OAuth工作流程一直有效,直到我尝试使用POST请求https://login.windows.net/common/oauth2/token请求访问令牌.它重定向回我的redirect_uri但不是给我auth代码,它在URL中给了我这些参数:
[error] => access_denied
[error_description] => AADSTS65005: The client application has requested access to resource 'https://outlook.office365.com/'. This request has failed because the client has not specified this resource in its requiredResourceAccess list.
Trace ID: xxxxxx
Correlation ID: xxxxxx
Timestamp: 2014-09-29 06:28:25Z
[state] => xxxxxx
Run Code Online (Sandbox Code Playgroud)
我需要的只是O365给我用户的电子邮件和f/l名称.当然有一个快速修复,我错过了?