1

我正在使用AdalJS v1.0.8 库来授权用户使用 Azure AD 端点,并且想知道AdalJS/openid/oauth2 中是否支持、和的&scope类型。emailaddressphone

我的授权端点 URL:

https://login.microsoftonline.com/ {tenant id}/oauth2/authorize?response_type=id_token&client_id={client id}&redirect_uri={我的重定向 uri}&state=2af81ff1-89ca-4f23-825d-ca29177c3df5&client-request-id= 2f82e417-630b-4318-88ed-c35103046249&x-client-SKU=Js&x-client-Ver=1.0.7&nonce=4c03cbca-03b2-4a53-acc6-1177f499969a&prompt=login&scope=openid+profile+email+address+phone

登录页面出现并且用户输入他们的凭据后,令牌成功返回,我可以profile在调用时看到用户的对象AuthenticationContext.getCachedUser()。但是,即使在查询字符串参数中请求了这些范围类型email,我也没有看到返回的信息addressphone&scope

AuthenticationContext.getCachedUser 结果 配置文件对象

4

1 回答 1

0

查看profile对象内部。您可能会在其中找到其他信息。

{
   "sub": "248289761001",
   "name": "Jane Doe",
   "given_name": "Jane",
   "family_name": "Doe",
   "preferred_username": "j.doe",
   "email": "janedoe@example.com",
   "picture": "http://example.com/janedoe/me.jpg"
}
于 2016-02-25T17:14:20.580 回答