简体   繁体   English

Microsoft Graph API为MSA用户返回UnknownError

[英]Microsoft Graph API is returning UnknownError for MSA users

We are using Microsoft V2.0 OpendID protocol as an SSO approach to make MSA and AAD users login into our application. 我们使用Microsoft V2.0 OpendID协议作为SSO方法,以使MSA和AAD用户登录到我们的应用程序。

Following are the scopes that we are using in authorization URL 以下是我们在授权URL中使用的范围

openid profile email user.read

After user gave consent, with the access token that we got from token API ( /oauth2/v2.0/token -- scope = user.read ), we are making Microsoft Graph call to https://graph.microsoft.com/v1.0/me in order to get email and other user info. 在用户同意后,使用从令牌API获得的访问令牌( /oauth2/v2.0/token scope = user.read ),我们scope = user.read Microsoft Graph进行https://graph.microsoft.com/v1.0/me调用https://graph.microsoft.com/v1.0/me ,以便获取电子邮件和其他用户信息。

Until 3/12/2018 the above call was working as expected. 直到2018年3月12日,上述通话仍按预期进行。 But starting from 3/13/2018 we are seeing weird behavior from the API. 但是从3/13/2018开始,我们从API中看到了奇怪的行为。

For the MSA users who are newly coming to our application to sign in, https://graph.microsoft.com/v1.0/me is throwing following errors. 对于刚进入我们应用程序的MSA用户来说, https://graph.microsoft.com/v1.0/me会引发以下错误。

Error 1: 错误1:

{
    "error": {
        "code": "RetryWithPuid",
        "message": "Please retry With PUID in either token or URL",
        "innerError": {
            "request-id": "18386e9b-c30e-459d-b816-f67f4a843874",
            "date": "2018-03-14T10:42:11"
        }
    }
}

Error 2: 错误2:

{
    "error": {
        "code": "UnknownError",
        "message": "{\r\n  \"ErrorCode\": \"ErrorUserResolutionFailedAfterMailboxSuccessfullyProvisioned\",\r\n  \"Message\": \"Exception of type 'Microsoft.Fast.Profile.Core.Exception.ProfileNotFoundException' was thrown.\",\r\n  \"Target\": null,\r\n  \"Details\": null,\r\n  \"InnerError\": null,\r\n  \"InstanceAnnotations\": []\r\n}",
        "innerError": {
            "request-id": "23c18edc-d451-4056-ab7c-0c23fb7b77f5",
            "date": "2018-03-14T08:03:11"
        }
    }
}

The above errors are unstable. 以上错误是不稳定的。 We are not seeing the above issue for the users who already signed into our application (before 3/12). 对于已经登录我们的应用程序的用户(3/12之前),我们没有看到上述问题。

I could not able to find any info regarding above errors. 我找不到有关上述错误的任何信息。

I'm facing the same issue right now, we were not receiving this error before. 我现在正面临相同的问题,我们之前没有收到此错误。 I found a way to make it work while doing some tests, but didn't find a proper solution yet. 我找到了一种在进行一些测试时使其运行的方法,但还没有找到合适的解决方案。

The steps are : 步骤如下:

Quick fix: Login in Microsoft graph-explorer with the account you the face problem. 快速修复:使用您遇到的帐户在Microsoft graph-explorer中登录。 Microsoft will ask for some permission and after allowing it.There is no error Please retry With PUID Microsoft将要求一些许可,并且在允许后。没有错误, Please retry With PUID 在此处输入图片说明

No proper way to fix this. 没有解决此问题的正确方法。 The Azure team should fix this issue asap Azure团队应尽快解决此问题

Tested that too and I can confirm it is perfectly reproducible. 也进行了测试,我可以确认它是完全可复制的。 Steps are: 步骤如下:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM