gpt4 book ai didi

azure - 用户信息 - 获取更多

转载 作者:行者123 更新时间:2023-12-03 05:38:16 25 4
gpt4 key购买 nike

我已在 Azure 中注册了应用程序。我https://graph.microsoft.com/v1.0/users来获取用户信息。

是否有任何选项可以获取有关用户的所有信息?看看我可以在 JSON 响应中获取哪些数据?

现在当我使用https://graph.microsoft.com/v1.0/users时我只得到几个信息,例如:

{
"aio": "kjaldjsfhkjsadhflkdhsafkjadhsfa",
"amr": "[\"pwd\"]",
"family_name": "Picasso",
"given_name": "Pablo",
"ipaddr": "11.12.113.144",
"name": "Pablo Picasso",
"oid": "234234-2343-4343-43434-2342342",
"onprem_sid": "234234234-23-423-4-234-2-34-234",
"sub": "234233q45rtferfwverfwgw45grfg45g45",
"tid": "sdfkjgasdhjfgasjdhfgashjdfgasdhjf",
"unique_name": "<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0b7b6a696764257b62686a7878644b6864667b6a657225686466" rel="noreferrer noopener nofollow">[email protected]</a>",
"upn": "<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f18190939d9edf8198929082829eb1929e9c81909f88df929e9c" rel="noreferrer noopener nofollow">[email protected]</a>",
"uti": "kajshdfkljahsdfkjahsdkjfahsd",
"ver": "1.0"
}

实际上我正在寻找用户名。我们可以使用快捷方式或电子邮件登录Windows。因此,如果用户名为 Pablo Picasso,则用户可以使用用户名 PaPi 登录。我正在寻找这个。

最佳答案

Considering, you already know how to get token. Now see below example

如果您想使用 Microsoft Graph API 获取 employeeIdidentitiesofficeLocation。尝试以下方法:

请求:

https://graph.microsoft.com/v1.0/users?$select=employeeId ,identities ,officeLocation 

响应:

{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(employeeId,identities,officeLocation)",
"@odata.nextLink": "https://graph.microsoft.com/v1.0/users?$select=employeeId+%2cidentities+%2cofficeLocation&$skiptoken=X%27445370740",
"value": [
{
"employeeId": 0200010000001C3A54696E614068616E,
"officeLocation": Redmond, Usa,
"identities": [
{
"signInType": "userPrincipalName",
"issuer": "someEmail.onmicrosoft.com",
"issuerAssignedId": "tenant.onmicrosoft.com"
}
]
}
}

请参阅下面的屏幕截图:

enter image description here

请引用Official document如果您需要更多详细信息。

关于azure - 用户信息 - 获取更多,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60758083/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com