azure - 用户信息 - 获取更多

azure - user info - get more

我已经在 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": "pablo.picasso@company.com",
    "upn": "pablo.picasso@company.com",
    "uti": "kajshdfkljahsdfkjahsdkjfahsd",
    "ver": "1.0"
}

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

Considering, you already know . Now see below example

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

Request:

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

Response:

{
    "@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"
                }
            ]
        }
}

请参阅下面的屏幕截图:

如果您需要更多详细信息,请参阅Official document

谢谢Md Farid Uddin Kiron

我对所有字段的解决方法(没有 mailboxSettings 因为得到错误 403 访问被拒绝)

https://graph.microsoft.com/v1.0/me?$select=aboutMe,accountEnabled,ageGroup,assignedLicenses,assignedPlans,birthday,businessPhones,city,companyName,consentProvidedForMinor,country,createdDateTime,creationType,deletedDateTime,department,displayName,employeeId,faxNumber,givenName,hireDate,id,identities,imAddresses,mailNickname,mobilePhone,mySite,officeLocation,onPremisesDistinguishedName,onPremisesDomainName,onPremisesExtensionAttributes,onPremisesImmutableId,onPremisesLastSyncDateTime,onPremisesProvisioningErrors,onPremisesSamAccountName,onPremisesSecurityIdentifier,onPremisesSyncEnabled,onPremisesUserPrincipalName,otherMails,passwordPolicies,passwordProfile,pastProjects,postalCode,preferredDataLocation,preferredLanguage,preferredName,provisionedPlans,proxyAddresses,refreshTokensValidFromDateTime,responsibilities,schools,showInAddressList,skills,signInSessionsValidFromDateTime,state,streetAddress,surname,usageLocation,userPrincipalName,userType,interests,isResourceAccount,jobTitle,lastPasswordChangeDateTime,legalAgeGroupClassification,licenseAssignmentStates,mail