Azure AD:OpenId Connect v2 - UserInfo不返回用户名等。 [英] Azure AD: OpenId Connect v2 - UserInfo not returning username, etc.

查看:98
本文介绍了Azure AD:OpenId Connect v2 - UserInfo不返回用户名等。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了缺少UserInfo结果外,一切正常端点
中可用的phone,userPrincipalName等字段 https://graph.microsoft.com/v1 0.0 / ME / 。大多数
  这些字段都是设置用户所必需的。您认为结果相同或可以选择将它们添加到UserInfo。在大多数设置OpenId Connect的第三方应用程序中,我们没有选项来进行不必要的额外调用
来获取应该在UserInfo中提供的附加信息。

Everything works great except for the UserInfo results lacking fields like phone, userPrincipalName, etc that are available in endpoint https://graph.microsoft.com/v1.0/me/. Most  cases these fields are needed to setup users. You'd think the results would be same or have the option to add them to the UserInfo. On most third-party apps setting up OpenId Connect, we don't have an option to make the needless extra call to get the additional information which should be provided in the UserInfo.

有没有办法将缺少的字段添加到UserInfo输出中?

Open Id Scopes :openid email profile

Open Id Scopes: openid email profile

userinfo_endpoint:
" https://graph.microsoft.com/oidc/userinfo"

回复

Response:

{

    " sub":" Y7pQ-Ra6FCwePudogNOjvjD3uTKHj9PEMoLtuyKYRxs",

    "sub": "Y7pQ-Ra6FCwePudogNOjvjD3uTKHj9PEMoLtuyKYRxs",

    " name":" Spoony,Jim",

    "name": "Spoony, Jim",

    " family_name":" Spoony",

    "family_name": "Spoony",

    " given_name":" Jim",

    "given_name": "Jim",

    " picture" ;:\"https://graph.microsoft.com/v1.0/me/photo/$value" ;,

    "picture": "https://graph.microsoft.com/v1.0/me/photo/$value",

   ;  " email":" Jim.Spoony@test.com"

    "email": "Jim.Spoony@test.com"

}

回复: https://graph.microsoft.com/v1.0/me/

Response: https://graph.microsoft.com/v1.0/me/

{

    " @ odata.context":" https://graph.microsoft.com/v1.0/$metadata#users/$entity" ;,

    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users/$entity",

    " businessPhones":

    "businessPhones": [

        " +0(333)333-3476"

        "+0 (333) 333-3476"

    ],

    " displayName":" Spoony,Jim",

    "displayName": "Spoony, Jim",

    " givenName":" Jim",

    "givenName": "Jim",

    " jobTitle":" Senior Developer",

    "jobTitle": "Senior Developer",

    " mail" ;:\"Jim.Spoony@test.com" ;,

    "mail": "Jim.Spoony@test.com",

    " mobilePhone":" +3(333)333-3333",

    "mobilePhone": "+3 (333) 333-3333",

    " officeLocation":" US 333 Paramount DR",

    "officeLocation": "US 333 Paramount DR",

    " preferredLanguage" ;: null,

    "preferredLanguage": null,

    " surname" ;:" Spoony",

    "surname": "Spoony",

    " userPrincipalName":" Jim.Spoony@test.com" ;,

    "userPrincipalName": "Jim.Spoony@test.com",

    " id":" 5c12eb03-5af9-47a2-9c4a-3a57ab8de41d"

    "id": "5c12eb03-5af9-47a2-9c4a-3a57ab8de41d"

}

提前感谢您的支持帮助!

Thank you in advance for your help!

推荐答案

你好, 

Hello, 

感谢您提出的问题,我们正在调查此问题,并会尽快回复您。

Thanks for your question we're currently looking into this question and will get back to you as soon as possible.

谢谢

- Frank Hu

- Frank Hu


这篇关于Azure AD:OpenId Connect v2 - UserInfo不返回用户名等。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆