• <small id='SGGPc'></small><noframes id='SGGPc'>

      <legend id='SGGPc'><style id='SGGPc'><dir id='SGGPc'><q id='SGGPc'></q></dir></style></legend>
    1. <i id='SGGPc'><tr id='SGGPc'><dt id='SGGPc'><q id='SGGPc'><span id='SGGPc'><b id='SGGPc'><form id='SGGPc'><ins id='SGGPc'></ins><ul id='SGGPc'></ul><sub id='SGGPc'></sub></form><legend id='SGGPc'></legend><bdo id='SGGPc'><pre id='SGGPc'><center id='SGGPc'></center></pre></bdo></b><th id='SGGPc'></th></span></q></dt></tr></i><div id='SGGPc'><tfoot id='SGGPc'></tfoot><dl id='SGGPc'><fieldset id='SGGPc'></fieldset></dl></div>
      <tfoot id='SGGPc'></tfoot>

          <bdo id='SGGPc'></bdo><ul id='SGGPc'></ul>
      1. OAuth 与 O365 的集成失败并出现错误 AADSTS65005

        时间:2023-10-31

            <bdo id='YpivJ'></bdo><ul id='YpivJ'></ul>
              • <legend id='YpivJ'><style id='YpivJ'><dir id='YpivJ'><q id='YpivJ'></q></dir></style></legend>

                <small id='YpivJ'></small><noframes id='YpivJ'>

                <i id='YpivJ'><tr id='YpivJ'><dt id='YpivJ'><q id='YpivJ'><span id='YpivJ'><b id='YpivJ'><form id='YpivJ'><ins id='YpivJ'></ins><ul id='YpivJ'></ul><sub id='YpivJ'></sub></form><legend id='YpivJ'></legend><bdo id='YpivJ'><pre id='YpivJ'><center id='YpivJ'></center></pre></bdo></b><th id='YpivJ'></th></span></q></dt></tr></i><div id='YpivJ'><tfoot id='YpivJ'></tfoot><dl id='YpivJ'><fieldset id='YpivJ'></fieldset></dl></div>
                  <tbody id='YpivJ'></tbody>

                <tfoot id='YpivJ'></tfoot>
                  本文介绍了OAuth 与 O365 的集成失败并出现错误 AADSTS65005的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我们有一个网站(基于 php 框架构建),我们为教师/学生提供在线教育工具.我们已经与 google.com 进行了 OAuth 集成,用户可以使用他们的 google 帐户(可以是个人 gmail 帐户或 google 应用程序域的成员)注册"和登录"到我们的网站.

                  We have a web site (built on a php framework) where we provide online educational tools for teachers/students. We have done an OAuth integration with google.com where users can 'sign up' and 'sign in' to our site using their google accounts (could be a personal gmail account, or a member of a google apps domain).

                  我们正在尝试与 O365 进行类似的集成,我们的网站可以向 O365 询问用户的电子邮件和名字/姓氏,以便我们可以在我们的网站上为他们创建一个帐户,并在创建帐户后让他们登录.我们在 Azure -> Active Directory 中创建了一个应用程序列表,并生成了客户端 ID 和密码,并将它们插入到 PHP 代码中.OAuth 工作流程此处描述一直有效,直到我尝试并使用对 https://login.windows.net/common/oauth2 的 POST 请求请求访问令牌/令牌.它重定向回我的 redirect_uri 但不是给我验证码,而是在 URL 中给我这些参数:

                  We are trying to do a similar integration with O365 where our website can ask O365 for user's email and first/last names so we can create an account for them on our site, and once the account is created, log them in. We have created an Application listing in Azure -> Active Directory, and have generated the client ID and secret, and plugged them into out PHP code. The OAuth workflow described here works up until the point where I try and request the access token using a POST request to https://login.windows.net/common/oauth2/token. It redirects back to my redirect_uri but instead of giving me the auth code, it gives me these params in the 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
                  

                  我所需要的只是让 O365 给我用户的电子邮件和 f/l 姓名.肯定有我缺少的快速解决方案吗?

                  All I need is for O365 to give me the user's email and f/l names. Surely there's a quick fix for this that I am missing?

                  推荐答案

                  默认情况下,注册的应用程序配置为请求读取用户的个人资料",一旦用户同意,允许应用程序获取用户令牌(ID 令牌,如果使用 OpenID Connect)并在调用 Azure AD 图形 API.受 Azure AD 保护的应用当前必须预先配置它们所需的权限范围(作为应用注册体验的一部分,在对其他应用程序的权限"部分下).在这里,您似乎已将 Outlook.com 指定为您需要代码和访问令牌的资源,但您的应用未配置为允许访问 O365 Outlook.com/Exchange Online.

                  By default, a registered app is configured to request "Read the user's profile", which once consented to by the user, allows the app to get a user token (id token if using OpenID Connect) and read the signed in user's profile (including their mail address or addresses) when calling the Azure AD Graph API. Apps secured by Azure AD must currently configure the permission scopes they require up front (as part of the app registration experience, under the "Permissions to other applications" section). Here it looks like you've specified Outlook.com as the resource that you'd like a code and access token for, but your app is not configured to allow access to O365 Outlook.com/Exchange Online.

                  请尝试在 Azure AD 的请求中设置资源 - https://graph.windows.net/.那应该为你工作.然后,您可以将代码交换为访问令牌以调用 Azure AD Graph API.

                  Please try setting the resource in your request to Azure AD - https://graph.windows.net/. That should work for you. You can then swap the code for an access token to call the Azure AD Graph API.

                  希望对你有帮助

                  这篇关于OAuth 与 O365 的集成失败并出现错误 AADSTS65005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:方法redirectToRoute() 可以有render() 之类的参数吗? 下一篇:Azure 是否提供任何以编程方式登录、重置密码或设备身份验证的功能,如 AWS Cognito?

                  相关文章

                  <tfoot id='Qzx7j'></tfoot>

                  <small id='Qzx7j'></small><noframes id='Qzx7j'>

                  • <bdo id='Qzx7j'></bdo><ul id='Qzx7j'></ul>

                    <legend id='Qzx7j'><style id='Qzx7j'><dir id='Qzx7j'><q id='Qzx7j'></q></dir></style></legend>
                  1. <i id='Qzx7j'><tr id='Qzx7j'><dt id='Qzx7j'><q id='Qzx7j'><span id='Qzx7j'><b id='Qzx7j'><form id='Qzx7j'><ins id='Qzx7j'></ins><ul id='Qzx7j'></ul><sub id='Qzx7j'></sub></form><legend id='Qzx7j'></legend><bdo id='Qzx7j'><pre id='Qzx7j'><center id='Qzx7j'></center></pre></bdo></b><th id='Qzx7j'></th></span></q></dt></tr></i><div id='Qzx7j'><tfoot id='Qzx7j'></tfoot><dl id='Qzx7j'><fieldset id='Qzx7j'></fieldset></dl></div>