【发布时间】:2019-05-17 08:32:49
【问题描述】:
我有一个带有 iframe 的页面,其中显示了一个由 AAD SSO 验证的公司网站。
当我直接在 IE 中访问公司网站时,一切正常,但是当它在 iframe 中时,它重定向到 login.microsoft.com,然后返回并出现错误:
Forbidden:
This corporate app can't be accessed.
You are not authorized to access this application
Azure AD Application Proxy
Azure AD Application Proxy
Status code: Forbidden
Url: https://mycorporatesite/%3ferror%3daccess_denied%26error_description%3dAADSTS50105%253a%2bThe%2bsigned%2bin%2buser%2b%2527%2...
TransactionID: 2656c424-9b94-4af7-8ed3-123b65b6fef9
ConnectorGroupId: b58ad765-2dc9-443e-bed8-70558cc3f463
Timestamp: 5/20/2019 7:26:57 AM
它适用于除 IE 之外的所有浏览器,包括 Edge(即使在私人模式下)
我必须提到,我的电脑连接到网站使用的不同 AD,但正如我所提到的,当我直接访问该网站时它工作正常。
以下是 iframe 发出的请求:
GET https://mycorporatesite.com/RestApi/?SPHostUrl=.....
Response 302 / Found
Response Headers: location: https://login.microsoftonline.com/{tenant}/oauth2/authorize?response_type=code&client_id=...
GET https://login.microsoftonline.com/{tenant}/oauth2/authorize?response_type=code&client_id=...
Response 302 / Found
Response Headers: location: https://mycorporatesite.com?error=access_denied&error_description=AADSTS50105%3a+The+signed+in+user+%27%7bEmailHidden%7d%27+is+not+assigned+to+a+role+for+the+application+...
GET https://mycorporatesite.com?error=access_denied&error_description=AADSTS50105%3a+The+signed+in+user+%27%7bEmailHidden%7d%27+is+not+assigned+to+a+role+for+the+application+...
Response 403 / Forbidden
【问题讨论】:
-
当用户未分配给 Azure Active Directory 中的应用程序时,或者在后端用户无权访问应用程序时,可能会发生此错误。请参阅这些链接以获取更多信息。 docs.microsoft.com/en-us/azure/active-directory/manage-apps/… 和 github.com/Huachao/azure-content/blob/master/articles/…
-
您能否将错误中提到相关 ID 和时间戳的部分包括在内?
-
@deepak-MSFT - 我理解错误,但它不应该发生,因为我可以直接访问该站点。为什么它发生在 iframe 中?我猜 iframe 选择了错误的用户
-
尝试从 iframe 打印用户相关信息以检查它正在使用哪个用户可能有助于缩小问题范围。
-
我已编辑 anwser 以包含所有错误详细信息,但只有事务 ID、时间戳和 ConnectorGroupId。我几乎可以肯定 IE IFrame 使用的是我连接到 Windows 的帐户。
标签: internet-explorer iframe azure-active-directory single-sign-on