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

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

        <i id='dGyYq'><tr id='dGyYq'><dt id='dGyYq'><q id='dGyYq'><span id='dGyYq'><b id='dGyYq'><form id='dGyYq'><ins id='dGyYq'></ins><ul id='dGyYq'></ul><sub id='dGyYq'></sub></form><legend id='dGyYq'></legend><bdo id='dGyYq'><pre id='dGyYq'><center id='dGyYq'></center></pre></bdo></b><th id='dGyYq'></th></span></q></dt></tr></i><div id='dGyYq'><tfoot id='dGyYq'></tfoot><dl id='dGyYq'><fieldset id='dGyYq'></fieldset></dl></div>
        <tfoot id='dGyYq'></tfoot><legend id='dGyYq'><style id='dGyYq'><dir id='dGyYq'><q id='dGyYq'></q></dir></style></legend>
      1. OAuth 与 O365 的集成失败,错误为 AADSTS65005

        时间:2023-07-16
      2. <legend id='Cjpen'><style id='Cjpen'><dir id='Cjpen'><q id='Cjpen'></q></dir></style></legend>
          <bdo id='Cjpen'></bdo><ul id='Cjpen'></ul>
        • <tfoot id='Cjpen'></tfoot>
          <i id='Cjpen'><tr id='Cjpen'><dt id='Cjpen'><q id='Cjpen'><span id='Cjpen'><b id='Cjpen'><form id='Cjpen'><ins id='Cjpen'></ins><ul id='Cjpen'></ul><sub id='Cjpen'></sub></form><legend id='Cjpen'></legend><bdo id='Cjpen'><pre id='Cjpen'><center id='Cjpen'></center></pre></bdo></b><th id='Cjpen'></th></span></q></dt></tr></i><div id='Cjpen'><tfoot id='Cjpen'></tfoot><dl id='Cjpen'><fieldset id='Cjpen'></fieldset></dl></div>

              <tbody id='Cjpen'></tbody>

            1. <small id='Cjpen'></small><noframes id='Cjpen'>

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

                  问题描述

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

                  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 工作流程此处描述一直有效,直到我尝试并使用 POST 请求向 https://login.windows.net/common/oauth2 请求访问令牌/令牌.它重定向回我的 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?

                  推荐答案

                  默认情况下,已注册的应用程序配置为请求读取用户的个人资料",一旦用户同意,该应用程序就可以获取用户令牌(如果使用 OpenID Connect,则为 id 令牌)并在调用 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Google OAuth2 登录 - 获取 YouTube 昵称和真实电子邮件地址 下一篇:谷歌API PHP离线访问,“invalid_grant:代码已经兑换"

                  相关文章

                    <bdo id='rWG8S'></bdo><ul id='rWG8S'></ul>

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

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

                    1. <tfoot id='rWG8S'></tfoot>